Skip to content

Commit

Permalink
fix(Symbol): $$observable is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
bouzuya authored and kwonoj committed Mar 25, 2016
1 parent 9700a51 commit e66b2d8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/symbol/observable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ const Symbol: any = root.Symbol;
export let $$observable: any;

if (typeof Symbol === 'function') {
if (!Symbol.observable) {
if (Symbol.observable) {
$$observable = Symbol.observable;
} else {
if (typeof Symbol.for === 'function') {
$$observable = Symbol.for('observable');
} else {
Expand All @@ -15,4 +17,4 @@ if (typeof Symbol === 'function') {
}
} else {
$$observable = '@@observable';
}
}

0 comments on commit e66b2d8

Please sign in to comment.