glib-web 4.37.1 → 4.37.2

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.
Files changed (2) hide show
  1. package/app.vue +6 -2
  2. package/package.json +1 -1
package/app.vue CHANGED
@@ -61,7 +61,7 @@ import { computed, onBeforeUnmount, onMounted, provide, ref } from "vue";
61
61
  import { TOOLTIP_ID } from "./constant";
62
62
  import { watchGlibEvent } from "./store";
63
63
  import { htmlElement } from "./components/helper";
64
-
64
+ import { nextTick } from "vue";
65
65
 
66
66
  export default {
67
67
  expose: ['updateMainHeight'],
@@ -242,7 +242,11 @@ export default {
242
242
  if (isRerender()) {
243
243
  GLib.action.execute(this.page.onRerender, this);
244
244
  } else {
245
- GLib.action.execute(this.page.onLoad, this);
245
+ // Without this, if you have page.onLoad() that calls components_find(), it might not
246
+ // find the component, because the component may not be registered yet.
247
+ nextTick(() => {
248
+ GLib.action.execute(this.page.onLoad, this);
249
+ });
246
250
  }
247
251
  },
248
252
  updateMainHeight() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glib-web",
3
- "version": "4.37.1",
3
+ "version": "4.37.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {