@tmagic/stage 1.5.9 → 1.5.10
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.
- package/dist/tmagic-stage.js +3 -0
- package/dist/tmagic-stage.umd.cjs +3 -0
- package/package.json +2 -2
- package/src/StageRender.ts +4 -0
package/dist/tmagic-stage.js
CHANGED
|
@@ -2310,6 +2310,9 @@ class StageRender extends EventEmitter$1 {
|
|
|
2310
2310
|
getMagicApi = () => ({
|
|
2311
2311
|
onPageElUpdate: (el) => this.emit("page-el-update", el),
|
|
2312
2312
|
onRuntimeReady: (runtime) => {
|
|
2313
|
+
if (this.runtime) {
|
|
2314
|
+
return;
|
|
2315
|
+
}
|
|
2313
2316
|
this.runtime = runtime;
|
|
2314
2317
|
globalThis.runtime = runtime;
|
|
2315
2318
|
this.emit("runtime-ready", runtime);
|
|
@@ -4783,6 +4783,9 @@
|
|
|
4783
4783
|
getMagicApi = () => ({
|
|
4784
4784
|
onPageElUpdate: (el) => this.emit("page-el-update", el),
|
|
4785
4785
|
onRuntimeReady: (runtime) => {
|
|
4786
|
+
if (this.runtime) {
|
|
4787
|
+
return;
|
|
4788
|
+
}
|
|
4786
4789
|
this.runtime = runtime;
|
|
4787
4790
|
globalThis.runtime = runtime;
|
|
4788
4791
|
this.emit("runtime-ready", runtime);
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.5.
|
|
2
|
+
"version": "1.5.10",
|
|
3
3
|
"name": "@tmagic/stage",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/tmagic-stage.umd.cjs",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"typescript": "*",
|
|
45
|
-
"@tmagic/core": "1.5.
|
|
45
|
+
"@tmagic/core": "1.5.10"
|
|
46
46
|
},
|
|
47
47
|
"peerDependenciesMeta": {
|
|
48
48
|
"typescript": {
|
package/src/StageRender.ts
CHANGED
|
@@ -56,6 +56,10 @@ export default class StageRender extends EventEmitter {
|
|
|
56
56
|
public getMagicApi = () => ({
|
|
57
57
|
onPageElUpdate: (el: HTMLElement) => this.emit('page-el-update', el),
|
|
58
58
|
onRuntimeReady: (runtime: Runtime) => {
|
|
59
|
+
if (this.runtime) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
|
|
59
63
|
this.runtime = runtime;
|
|
60
64
|
// @ts-ignore
|
|
61
65
|
globalThis.runtime = runtime;
|