Skip to content

Commit 3d53cc4

Browse files
authored
fix: upstream node.js changes (#121)
1 parent 80ddeaf commit 3d53cc4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

punycode.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ const encode = function(input) {
342342
if (currentValue < n && ++delta > maxInt) {
343343
error('overflow');
344344
}
345-
if (currentValue == n) {
345+
if (currentValue === n) {
346346
// Represent delta as a generalized variable-length integer.
347347
let q = delta;
348348
for (let k = base; /* no condition */; k += base) {
@@ -359,7 +359,7 @@ const encode = function(input) {
359359
}
360360

361361
output.push(stringFromCharCode(digitToBasic(q, 0)));
362-
bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
362+
bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);
363363
delta = 0;
364364
++handledCPCount;
365365
}

0 commit comments

Comments
 (0)