glib-web 4.37.0 → 4.37.1

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.
@@ -0,0 +1,10 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Read(//home/hgani/workspace/glib-web/app/views/json_ui/garage/**)",
5
+ "Read(//home/hgani/workspace/glib-web-npm/doc/garage/**)"
6
+ ],
7
+ "deny": [],
8
+ "ask": []
9
+ }
10
+ }
@@ -5,7 +5,11 @@ export default class {
5
5
  const target = GLib.component.findById(spec.targetId);
6
6
 
7
7
  if (!target) {
8
- console.warn("Component ID not found", spec.targetId);
8
+ if (spec.onFailFind) {
9
+ Action.execute(spec.onFailFind, component);
10
+ } else {
11
+ console.warn("Component ID not found", spec.targetId);
12
+ }
9
13
  return;
10
14
  }
11
15
 
@@ -3,6 +3,16 @@ import Action from "../../action";
3
3
  export default class {
4
4
  execute(spec, component) {
5
5
  const target = component.$closest(spec.view);
6
+
7
+ if (!target) {
8
+ if (spec.onFailFind) {
9
+ Action.execute(spec.onFailFind, component);
10
+ } else {
11
+ console.warn("Component not found", spec.view);
12
+ }
13
+ return;
14
+ }
15
+
6
16
  Action.execute(spec.onFind, target);
7
17
  }
8
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glib-web",
3
- "version": "4.37.0",
3
+ "version": "4.37.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {