Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/internal/locks.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const {
PromisePrototypeThen,
PromiseResolve,
SafePromisePrototypeFinally,
StringPrototypeStartsWith,
Symbol,
SymbolToStringTag,
} = primordials;
Expand Down Expand Up @@ -159,7 +160,7 @@ class LockManager {
signal.throwIfAborted();
}

if (name.startsWith('-')) {
if (StringPrototypeStartsWith(name, '-')) {
// If name starts with U+002D HYPHEN-MINUS (-), then reject promise with a
// "NotSupportedError" DOMException.
throw lazyDOMException('Lock name may not start with hyphen',
Expand Down
Loading