We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d39030 commit 16ead22Copy full SHA for 16ead22
lib/internal/locks.js
@@ -6,6 +6,7 @@ const {
6
PromisePrototypeThen,
7
PromiseResolve,
8
SafePromisePrototypeFinally,
9
+ StringPrototypeStartsWith,
10
Symbol,
11
SymbolToStringTag,
12
} = primordials;
@@ -159,7 +160,7 @@ class LockManager {
159
160
signal.throwIfAborted();
161
}
162
- if (name.startsWith('-')) {
163
+ if (StringPrototypeStartsWith(name, '-')) {
164
// If name starts with U+002D HYPHEN-MINUS (-), then reject promise with a
165
// "NotSupportedError" DOMException.
166
throw lazyDOMException('Lock name may not start with hyphen',
0 commit comments