Skip to content

Commit 9304795

Browse files
committed
Align location check with classic-level
Category: change
1 parent 0b98710 commit 9304795

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ class BrowserLevel extends AbstractLevel {
3030
seek: true
3131
}, forward)
3232

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

3737
// TODO (next major): remove default prefix

0 commit comments

Comments
 (0)