Skip to content

Fix typo in StorageArea.getKeys() documentation #40661

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

Merged
merged 1 commit into from
Aug 8, 2025
Merged

Conversation

Pokechu22
Copy link
Contributor

Description

The existing code sample uses the wrong variable name.

Motivation

I ran into this code sample when looking into https://bugzilla.mozilla.org/show_bug.cgi?id=1979997, where the error case is hit.

Additional details

N/A

Related issues and pull requests

Introduced in #40560.

@Pokechu22 Pokechu22 requested a review from a team as a code owner August 7, 2025 06:02
@Pokechu22 Pokechu22 requested review from rebloor and removed request for a team August 7, 2025 06:02
@github-actions github-actions bot added Content:WebExt WebExtensions docs size/xs [PR only] 0-5 LoC changed labels Aug 7, 2025
Copy link
Contributor

@rebloor rebloor left a comment

Choose a reason for hiding this comment

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

Thanks for spotting and fixing @Pokechu22

@rebloor rebloor merged commit 4ef3e1f into mdn:main Aug 8, 2025
7 checks passed
@@ -49,7 +49,7 @@ Retrieve keys of all items in storage.local and log the result.
browser.storage.local
.getKeys()
.then((keys) => console.log(keys)) // [ "kitten", "monster" ]
.catch((err) => console.error(`Error: ${error}`));
.catch((err) => console.error(`Error: ${err}`));

Choose a reason for hiding this comment

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

Suggested change
.catch((err) => console.error(`Error: ${err}`));
.catch((err) => console.error(`Error: ${err}`));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebExt WebExtensions docs size/xs [PR only] 0-5 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants