Skip to content

Commit

Permalink
Align location check with classic-level
Browse files Browse the repository at this point in the history
Category: change
  • Loading branch information
vweevers committed Dec 1, 2024
1 parent 0b98710 commit 9304795
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class BrowserLevel extends AbstractLevel {
seek: true
}, forward)

if (typeof location !== 'string') {
throw new Error('constructor requires a location string argument')
if (typeof location !== 'string' || location === '') {
throw new TypeError("The first argument 'location' must be a non-empty string")
}

// TODO (next major): remove default prefix
Expand Down

0 comments on commit 9304795

Please sign in to comment.