Skip to content

Commit db99ee9

Browse files
committed
fix #149; avoid ES2020 syntax; enforce ES2019
1 parent ee1044f commit db99ee9

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

eslint.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ import {defineConfig} from "eslint/config";
44

55
export default defineConfig([
66
{files: ["**/*.{js,ts,jsx,tsx}"], plugins: {js}, extends: ["js/recommended"]},
7-
{files: ["**/*.{js,ts,jsx,tsx}"], languageOptions: {globals: globals.browser}}
7+
{files: ["**/*.{js,ts,jsx,tsx}"], languageOptions: {globals: globals.browser}},
8+
{languageOptions: {ecmaVersion: 2019, sourceType: "module"}}
89
]);

src/locale.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ export default function(locale) {
4545

4646
// Compute the prefix and suffix.
4747
// For SI-prefix, the suffix is lazily computed.
48-
var prefix = (options?.prefix !== undefined ? options.prefix : "") + (symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : ""),
49-
suffix = (symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "") + (options?.suffix !== undefined ? options.suffix : "");
48+
var prefix = (options && options.prefix !== undefined ? options.prefix : "") + (symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : ""),
49+
suffix = (symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "") + (options && options.suffix !== undefined ? options.suffix : "");
5050

5151
// What format function should we use?
5252
// Is this an integer type?

0 commit comments

Comments
 (0)