Skip to content

Commit

Permalink
fix: Remove dependency on window-or-global because it's bigger than i…
Browse files Browse the repository at this point in the history
…t needs to be doesn't export a
  • Loading branch information
treshugart committed Jan 17, 2017
1 parent 068563c commit d02a62a
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
"src"
],
"dependencies": {
"incremental-dom": "0.4.1",
"window-or-global": "1.0.1"
"incremental-dom": "0.4.1"
},
"devDependencies": {
"@webpack-blocks/babel6": "^0.3.0",
Expand Down
2 changes: 1 addition & 1 deletion src/api/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { createNativePropertyDescriptor } from '../lifecycle/props-init';
import { isFunction } from '../util/is-type';
import objectIs from '../polyfills/object-is';
import setCtorNativeProperty from '../util/set-ctor-native-property';
import root from 'window-or-global';
import root from '../util/root';

const HTMLElement = root.HTMLElement || class {};
const _prevName = createSymbol('prevName');
Expand Down
2 changes: 1 addition & 1 deletion src/api/define.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Component from './component';
import uniqueId from '../util/unique-id';
import root from 'window-or-global';
import root from '../util/root';

export default function (...args) {
const { customElements, HTMLElement } = root;
Expand Down
2 changes: 1 addition & 1 deletion src/api/emit.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import root from 'window-or-global';
import root from '../util/root';

const Event = ((TheEvent) => {
if (TheEvent) {
Expand Down
2 changes: 1 addition & 1 deletion src/api/vdom.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from 'incremental-dom';
import { name as $name, ref as $ref } from '../util/symbols';
import propContext from '../util/prop-context';
import root from 'window-or-global';
import root from '../util/root';

const { customElements, HTMLElement } = root;
const applyDefault = attributes[symbols.default];
Expand Down
2 changes: 1 addition & 1 deletion src/util/debounce.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import native from './native';
import root from 'window-or-global';
import root from './root';

const { MutationObserver } = root;

Expand Down
1 change: 1 addition & 0 deletions src/util/root.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default typeof window === 'undefined' ? global : window;

0 comments on commit d02a62a

Please sign in to comment.