Skip to content

Commit

Permalink
fix: #387 CherryEngine TypeError (#535)
Browse files Browse the repository at this point in the history
  • Loading branch information
ufec authored Aug 17, 2023
1 parent 0fc0399 commit 56165bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/Cherry.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ export default class Cherry extends CherryStatic {
this.options.instanceId = this.instanceId;

/**
* @private
* @type {Engine}
* @type {import('./Engine').default}
*/
this.engine = new Engine(this.options, this);
this.init();
Expand Down
4 changes: 2 additions & 2 deletions src/index.engine.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ class CherryEngine extends CherryStatic {
opts.engine.global.urlProcessor = urlProcessorProxy(opts.engine.global.urlProcessor);
}

/** @type {import('./Engine').default}*/
// @ts-ignore hack Cherry Instance
const $engine = new Engine(opts, { options: opts });
return $engine;
this.engine = new Engine(opts, { options: opts });
}
}

Expand Down

0 comments on commit 56165bf

Please sign in to comment.