merge-upstream: remove unnecessary Object.keys usage
might be a tiny bit faster
This commit is contained in:
1 parent
ba101b3ee8
commit
5c1934099e
1 file changed
+3
-3
@@ -66,11 +66,11 @@ class Theme {
|
||||
/** @readonly */
|
||||
this.id = ++themeObjectsCreated;
|
||||
/** @readonly */
|
||||
this.accent = Object.keys(ACCENT_MAP).includes(accent) ? accent : ACCENT_DEFAULT;
|
||||
this.accent = Object.prototype.hasOwnProperty.call(ACCENT_MAP, accent) ? accent : ACCENT_DEFAULT;
|
||||
/** @readonly */
|
||||
this.gui = Object.keys(GUI_MAP).includes(gui) ? gui : GUI_DEFAULT;
|
||||
this.gui = Object.prototype.hasOwnProperty.call(GUI_MAP, gui) ? gui : GUI_DEFAULT;
|
||||
/** @readonly */
|
||||
this.blocks = Object.keys(BLOCKS_MAP).includes(blocks) ? blocks : BLOCKS_DEFAULT;
|
||||
this.blocks = Object.prototype.hasOwnProperty.call(BLOCKS_MAP, blocks) ? blocks : BLOCKS_DEFAULT;
|
||||
}
|
||||
|
||||
static light = new Theme(ACCENT_DEFAULT, GUI_LIGHT, BLOCKS_DEFAULT);
|
||||
|
||||
Reference in new issue
Block a user