Skip to content

Commit

Permalink
fix broken usage at gatsby
Browse files Browse the repository at this point in the history
  • Loading branch information
bluebill1049 committed Nov 8, 2020
1 parent 5ae1b73 commit ff83d73
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "little-state-machine",
"sideEffects": false,
"version": "3.1.2",
"version": "3.1.3-beta.3",
"main": "dist/little-state-machine.js",
"module": "dist/little-state-machine.es.js",
"types": "dist/index.d.ts",
Expand Down
3 changes: 1 addition & 2 deletions src/stateMachine.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as React from 'react';
import storeFactory from './logic/storeFactory';
import isUndefined from './utils/isUndefined';
import isSessionStorageAllowed from './utils/isSessionStorageAllowed';
import { setUpDevTools } from './logic/devTool';
import StateMachineContext from './StateMachineContext';
import getSyncStoreData from './logic/getSyncStoreData';
Expand All @@ -22,7 +21,7 @@ import {

const isClient = typeof window !== 'undefined';
const isDevMode: boolean = process.env.NODE_ENV !== 'production';
let storageType: Storage = isClient && isSessionStorageAllowed()
let storageType: Storage = isClient && typeof(sessionStorage) !== 'undefined'
? window.sessionStorage
: {
getItem: payload => payload,
Expand Down
7 changes: 0 additions & 7 deletions src/utils/isSessionStorageAllowed.ts

This file was deleted.

0 comments on commit ff83d73

Please sign in to comment.