Skip to content

Commit

Permalink
fix: upstream node.js changes (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
anonrig authored Jan 1, 2023
1 parent 80ddeaf commit 3d53cc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions punycode.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ const encode = function(input) {
if (currentValue < n && ++delta > maxInt) {
error('overflow');
}
if (currentValue == n) {
if (currentValue === n) {
// Represent delta as a generalized variable-length integer.
let q = delta;
for (let k = base; /* no condition */; k += base) {
Expand All @@ -359,7 +359,7 @@ const encode = function(input) {
}

output.push(stringFromCharCode(digitToBasic(q, 0)));
bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);
delta = 0;
++handledCPCount;
}
Expand Down

0 comments on commit 3d53cc4

Please sign in to comment.