Skip to content

Commit

Permalink
fix: target es5 for greater browser support
Browse files Browse the repository at this point in the history
  • Loading branch information
yangchristian committed Jul 17, 2017
1 parent 7d04e23 commit 31b1066
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# Usage

## Isomorphic/Do-these-once!
## Isomorphic/Only have to do these once!
Define some events in your library code:
```ts
// events.ts
Expand Down
8 changes: 6 additions & 2 deletions src/core/crosslytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ export class Crosslytics {

public async track<T>(event: TrackedEvent<T>) {
const promises = [];
for (const tracker of this.trackers.values()) {
promises.push(tracker.track(event));

let next = this.trackers.values().next();
while (!next.done) {
promises.push(next.value.track(event));
next = this.trackers.values().next();
}

return Promise.all(promises);
}
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"lib": [
"esnext"
],
"target": "es6",
"target": "es5",
"noImplicitAny": true,
"strictNullChecks": true,
"outDir": "./lib",
Expand Down

0 comments on commit 31b1066

Please sign in to comment.