Skip to content
This repository has been archived by the owner on Oct 1, 2022. It is now read-only.

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
itsRems committed Dec 6, 2021
1 parent b665e2b commit a065d69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/pulse-core/lib/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class Storage {
if (this.config.type === 'localStorage' && ls) {
// assign localStorage crud functions to config object
['get', 'set', 'remove'].forEach(type => (this.config[type] = ls[`${type}Item`].bind(ls)));
if (this.config.watch) {
if (this.config.watch && typeof window !== "undefined") {
window.addEventListener('storage', (event) => {
const k = this.extractKey(event.key);
const states = this.persistedState.values();
Expand Down

0 comments on commit a065d69

Please sign in to comment.