@basthon/console-react 0.4.8 → 0.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -85,6 +85,7 @@ export default class Terminal {
85
85
  this._buffer = [];
86
86
  }
87
87
  async _interpreter(command) {
88
+ await this._kernel.ready();
88
89
  // user answers to its program's input
89
90
  if (this._inputMode) {
90
91
  this._term.set_prompt("");
@@ -181,10 +182,13 @@ export default class Terminal {
181
182
  this.showScript(code);
182
183
  this.pause();
183
184
  this._term.set_prompt("");
184
- this._kernel.dispatchEvent("eval.request", {
185
- code: code,
186
- interactive: interactive,
187
- });
185
+ (async () => {
186
+ await this._kernel.ready();
187
+ this._kernel.dispatchEvent("eval.request", {
188
+ code: code,
189
+ interactive: interactive,
190
+ });
191
+ })();
188
192
  }
189
193
  /**
190
194
  * Give focus to terminal.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basthon/console-react",
3
- "version": "0.4.8",
3
+ "version": "0.4.9",
4
4
  "description": "Basthon - Console React Component",
5
5
  "homepage": "https://basthon.fr",
6
6
  "bugs": {