Skip to content

Commit 7176d5a

Browse files
kimtaejin3ljharb
andauthored
Apply suggestions from code review
Co-authored-by: Jordan Harband <ljharb@gmail.com>
1 parent 16ead22 commit 7176d5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/locks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ class LockManager {
160160
signal.throwIfAborted();
161161
}
162162

163-
if (StringPrototypeStartsWith(name, '-')) {
163+
if (name[0] === '-') {
164164
// If name starts with U+002D HYPHEN-MINUS (-), then reject promise with a
165165
// "NotSupportedError" DOMException.
166166
throw lazyDOMException('Lock name may not start with hyphen',

0 commit comments

Comments
 (0)