Safer estimation of possibly undefined values
| @@ -696,7 +696,7 @@ export class LimitedMap { | ||
| 696 | 696 | * @returns {number} |
| 697 | 697 | */ |
| 698 | 698 | static estimateStringSize(str) { |
| 699 | 699 | return str ? str.length * 2 : 0; |
| 700 | 700 | } |
| 701 | 701 | |
| 702 | 702 | /** |
| @@ -696,7 +696,7 @@ export class LimitedMap { | ||
| 696 | 696 | * @returns {number} |
| 697 | 697 | */ |
| 698 | 698 | static estimateStringSize(str) { |
| 699 | 699 | return str ? str.length * 2 : 0; |
| 700 | 700 | } |
| 701 | 701 | |
| 702 | 702 | /** |