mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-10 16:10:55 +00:00
4.20.67
* Added: Warning on the Profile Manager about profiles not matching when viewing the FFZ Control Center in a pop-out. * API Added: Badges can now have custom CSS. * API Added: Badges can now have a `click_handler()` method for running JS when clicked.
This commit is contained in:
parent
165e17c014
commit
3fb6d5957a
6 changed files with 183 additions and 10 deletions
|
@ -5,7 +5,7 @@
|
|||
// ============================================================================
|
||||
|
||||
import {EventEmitter} from 'utilities/events';
|
||||
import {has, get as getter, array_equals, set_equals, map_equals} from 'utilities/object';
|
||||
import {has, get as getter, array_equals, set_equals, map_equals, deep_equals} from 'utilities/object';
|
||||
|
||||
import * as DEFINITIONS from './types';
|
||||
|
||||
|
@ -217,8 +217,17 @@ export default class SettingsContext extends EventEmitter {
|
|||
let changed = false;
|
||||
|
||||
for(const key in context)
|
||||
if ( has(context, key) && context[key] !== this._context[key] ) {
|
||||
this._context[key] = context[key];
|
||||
if ( has(context, key) ) {
|
||||
const val = context[key];
|
||||
try {
|
||||
if ( deep_equals(val, this._context[key]) )
|
||||
continue;
|
||||
} catch(err) {
|
||||
/* no-op */
|
||||
// This can catch a recursive structure error.
|
||||
}
|
||||
|
||||
this._context[key] = val;
|
||||
changed = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue