Safer estimation of possibly undefined values
| @@ -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 | } |
| 701 | 701 | ||
| 702 | /** | 702 | /** |