Only update globals if they're different

This commit is contained in:
Gert Hengeveld 2021-10-26 12:45:52 +02:00
parent 897581e069
commit b36d6ac473

View File

@ -77,7 +77,7 @@ export const init: ModuleFn = ({ store, fullAPI }) => {
logger.warn('received globals from a non-local ref. This is not currently supported.');
}
if (currentGlobals) {
if (currentGlobals && !deepEqual(globals, currentGlobals)) {
api.updateGlobals(currentGlobals);
}
});