mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-20 05:05:47 +01:00
Fixed linting errors
This commit is contained in:
parent
d50c5abb66
commit
a18a2e8e70
@ -14,13 +14,18 @@ import 'numeral/locales/no';
|
||||
import 'numeral/locales/pl';
|
||||
import 'numeral/locales/ru';
|
||||
|
||||
/* eslint-disable class-methods-use-this */
|
||||
|
||||
class NumeralFormatter {
|
||||
constructor() {
|
||||
this.defaultLocale = 'en';
|
||||
}
|
||||
|
||||
updateLocale(l) {
|
||||
if (numeral.locale(l) == null) {
|
||||
console.warn(`Invalid locale for numeral: ${l}`);
|
||||
|
||||
let defaultValue = 'en';
|
||||
numeral.locale(defaultValue);
|
||||
numeral.locale(this.defaultLocale);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user