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

fix(prefixStorage): handle missing key #18

Merged
merged 3 commits into from
Sep 9, 2021

Conversation

farnabaz
Copy link
Collaborator

@farnabaz farnabaz commented Sep 9, 2021

key argument is optional in some functions, like (getKeys)

  • Add default value for key argument to prevent undefined key (base:undefined)
  • Normalize base + key to remove ending : in case of missing key (base:)

src/utils.ts Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Sep 9, 2021

Codecov Report

Merging #18 (933fb2c) into main (15fec29) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #18   +/-   ##
=======================================
  Coverage   89.94%   89.94%           
=======================================
  Files          12       12           
  Lines         398      398           
  Branches       78       79    +1     
=======================================
  Hits          358      358           
  Misses         40       40           
Impacted Files Coverage Δ
src/utils.ts 90.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 15fec29...933fb2c. Read the comment docs.

@pi0 pi0 merged commit 3c754cb into unjs:main Sep 9, 2021
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.

3 participants