Skip to content

Commit

Permalink
enable canary
Browse files Browse the repository at this point in the history
  • Loading branch information
hipstersmoothie committed Apr 20, 2021
1 parent 8d08510 commit 07fd25b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
4 changes: 0 additions & 4 deletions .circleci/config.yml
Expand Up @@ -165,7 +165,3 @@ workflows:
requires:
- lint
- unit-tests
filters:
branches:
only:
- master
9 changes: 4 additions & 5 deletions packages/storybook-theme-addon/src/theme/theme.tsx
Expand Up @@ -40,7 +40,7 @@ const STORAGE_TOKEN = `${THEME_SELECT_TOOL_ID}-storage`;

/** Persist the theme settings in localStorage */
const saveLocalStorage = (data: State) => {
if (typeof window === "undefined") {
if (!isWindowDefined) {
return;
}

Expand All @@ -49,10 +49,9 @@ const saveLocalStorage = (data: State) => {

/** Restore theme settings from localStorage */
const restoreLocalStorage = (defaultTheme?: Partial<State>): State => {
const data =
typeof window === "undefined"
? undefined
: window.localStorage.getItem(STORAGE_TOKEN);
const data = isWindowDefined
? window.localStorage.getItem(STORAGE_TOKEN)
: undefined;

if (data) {
const storedTheme = JSON.parse(data) as State;
Expand Down

0 comments on commit 07fd25b

Please sign in to comment.