message: fix: ignore not jsxc related storage events
diff: @@ -145,7 +145,7 @@ export default class Storage implements IStorage {
  }
  });
  } catch (err) {
  - console.warn('Could not stringify value', err);
  + Log.warn('Could not stringify value', err);
  }
  }
  @@ -318,15 +318,22 @@ export default class Storage implements IStorage {
  }
  private onStorageEvent = (ev: any) => {
  - let hooks = this.hooks;
  - let key = ev.key.replace(new RegExp('^' + this.getPrefix()), '');
  - let oldValue = this.parseValue(ev.oldValue);
  - let newValue = this.parseValue(ev.newValue);
  + let prefix = this.getPrefix();
  +
  + if (!ev.key || ev.key.indexOf(prefix) !== 0) {
  + return;
  + }
  +
  + let key = ev.key.slice(prefix.length);
  if (IGNORE_KEY.indexOf(key) > -1) {
  return;
  }
  + let hooks = this.hooks;
  + let oldValue = this.parseValue(ev.oldValue);
  + let newValue = this.parseValue(ev.newValue);
  +
  let eventNames = Object.keys(hooks);
  eventNames.forEach(function(eventName) {
  if (key.match(new RegExp('^' + eventName + '(:.+)?$'))) {
  