Safer estimation of possibly undefined values

c873362d0140208857d1857e637916d00d1c4d9a

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +1 -1Ignore whitespace
src/util.js+1 -1
@@ -696,7 +696,7 @@ export class LimitedMap {
696 * @returns {number}696 * @returns {number}
697 */697 */
698 static estimateStringSize(str) {698 static estimateStringSize(str) {
699 return str.length * 2;699 return str ? str.length * 2 : 0;
700 }700 }
701701
702 /**702 /**