Skip to content

Commit

Permalink
CLEANUP
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Mar 2, 2019
1 parent 242e611 commit 6489d05
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 1 addition & 5 deletions lib/ui/src/core/addons.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@ export default ({ provider, store }) => {
return {
api,
state: {
selectedPanel: ensurePanel(
api.getPanels(),
store.getState().selectedPanel,
store.getState().selectedPanel
),
selectedPanel: ensurePanel(api.getPanels(), store.getState().selectedPanel),
},
};
};
3 changes: 1 addition & 2 deletions lib/ui/src/core/shortcuts.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { navigator, document } from 'global';
import { PREVIEW_KEYDOWN } from '@storybook/core-events';

import getInitialState from './initial-state';
import { shortcutMatchesShortcut, eventToShortcut } from '../libs/shortcut';

export const isMacLike = () =>
Expand Down Expand Up @@ -32,7 +31,7 @@ export default function initShortcuts({ store }) {
const api = {
// Getting and setting shortcuts
getShortcutKeys() {
return store.getState().shortcuts || getInitialState().shortcuts;
return store.getState().shortcuts;
},
async setShortcuts(shortcuts) {
await store.setState({ shortcuts }, { persistence: 'permanent' });
Expand Down

0 comments on commit 6489d05

Please sign in to comment.