Skip to content

Commit

Permalink
Remove global.require usage for worker
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Nov 14, 2016
1 parent 5630bd6 commit db42c04
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions app/worker/reduxAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ function handleChange(state, liftedState, maxAge, instance) {
}

export default function devToolsEnhancer(options = {}) {
const defaultName = global.require ? global.require('Platform').OS : 'default';
const {
name,
maxAge = 30,
Expand Down Expand Up @@ -174,7 +173,7 @@ export default function devToolsEnhancer(options = {}) {
)(reducer, initialState);

instances[id] = {
name: name || `${defaultName}-${id}`,
name: name || id,
id,
store,
filters: (filters || actionsBlacklist || actionsWhitelist) && {
Expand Down
3 changes: 1 addition & 2 deletions app/worker/remotedev.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,8 @@ export function send(action, state, name, type, instanceId) {
}

export function connect(options = {}) {
const defaultName = global.require ? global.require('Platform').OS : 'default';
const id = generateId(options.instanceId);
const name = options.name || `${defaultName}-${id}`;
const name = options.name || id;
start();
return {
init(state, action) {
Expand Down

0 comments on commit db42c04

Please sign in to comment.