Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storage: use console.warn not console.warning to fix crash #435

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

AdamWill
Copy link
Contributor

@AdamWill AdamWill commented Sep 9, 2024

f66f8f4 mistakenly tried to log a warning with console.warning, which doesn't exist. It's console.warn. This means we still crash on the path where we crashed before, now with an error about console.warning being undefined.

f66f8f4 mistakenly tried to log a warning with `console.warning`,
which doesn't exist. It's `console.warn`. This means we still
crash on the path where we crashed before, now with an error
about `console.warning` being undefined.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
@AdamWill
Copy link
Contributor Author

AdamWill commented Sep 9, 2024

btw, this also looks like an odd invocation? Per https://developer.mozilla.org/en-US/docs/Web/API/console/warn_static it seems like if you call it with a string followed by some other args, the subsequent args should be substitutions for the string...but this string doesn't contain anything that would be substituted by e. Am I reading the doc wrong, or was there perhaps meant to be a template in the string somewhere?

@KKoukiou
Copy link
Contributor

btw, this also looks like an odd invocation? Per https://developer.mozilla.org/en-US/docs/Web/API/console/warn_static it seems like if you call it with a string followed by some other args, the subsequent args should be substitutions for the string...but this string doesn't contain anything that would be substituted by e. Am I reading the doc wrong, or was there perhaps meant to be a template in the string somewhere?

It will just be printed extra. See:

 If there are more substitution values than there are substitution strings, the extra values are themselves written to the console after the detailed assertion message in the same manner as when there's no format string.

In the link you sent.

Copy link
Contributor

@KKoukiou KKoukiou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Adam

@KKoukiou KKoukiou merged commit 334dcc4 into rhinstaller:main Sep 10, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants