Skip to content

Commit

Permalink
put genie in window
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyEntropy committed Apr 16, 2019
1 parent cc4f0fb commit 1981614
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions dist/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -42759,6 +42759,7 @@ var GenieEditor = /** @class */ (function (_super) {
var _a = _this.state, value = _a.value, dirty = _a.dirty;
if (!dirty)
return;
// tslint:disable-next-line: no-floating-promises
_this.updateIdl(value).then(function (success) {
if (!success)
return;
Expand Down Expand Up @@ -42867,6 +42868,7 @@ var GenieEditor = /** @class */ (function (_super) {
});
}
console.log('created schema');
window['genie'] = genie_1;
resolve(genie_1);
});
return schemaPromise;
Expand Down
2 changes: 1 addition & 1 deletion dist/main.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ class GenieEditor extends React.Component<any, GenieEditorState> {
});
}
console.log('created schema');
window['genie'] = genie;
resolve(genie);
});
return schemaPromise;
Expand Down Expand Up @@ -159,6 +160,7 @@ class GenieEditor extends React.Component<any, GenieEditorState> {
saveUserIDL = (): void => {
const { value, dirty } = this.state;
if (!dirty) return;
// tslint:disable-next-line: no-floating-promises
this.updateIdl(value).then(success => {
if (!success) return;
localStorage.setItem('currIDL', value || '');
Expand Down

0 comments on commit 1981614

Please sign in to comment.