@adminforth/foreign-inline-show 1.1.6 → 1.1.7

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/build.log CHANGED
@@ -6,5 +6,5 @@ sending incremental file list
6
6
  custom/
7
7
  custom/InlineShow.vue
8
8
 
9
- sent 4,109 bytes received 39 bytes 8,296.00 bytes/sec
10
- total size is 3,963 speedup is 0.96
9
+ sent 4,157 bytes received 39 bytes 8,392.00 bytes/sec
10
+ total size is 4,011 speedup is 0.96
@@ -73,6 +73,7 @@ async function getParentRecord() {
73
73
  console.warn('No parent resource or reference column found');
74
74
  parentRecord.value = null;
75
75
  loading.value = false;
76
+ return;
76
77
  }
77
78
 
78
79
  const foreignKeyValue = props.record[parentResourceRefColumn.value.name];
@@ -80,6 +81,7 @@ async function getParentRecord() {
80
81
  console.warn('No foreign key value found in the record', props.record);
81
82
  parentRecord.value = null;
82
83
  loading.value = false;
84
+ return;
83
85
  }
84
86
 
85
87
  const data = await callAdminForthApi({
@@ -102,11 +104,13 @@ async function getParentRecord() {
102
104
  console.error('No data returned from API', data);
103
105
  parentRecord.value = null;
104
106
  loading.value = false;
107
+ return;
105
108
  }
106
109
  if (data.error) {
107
110
  showErrorTost(data.error);
108
111
  parentRecord.value = null;
109
112
  loading.value = false;
113
+ return;
110
114
  }
111
115
  loading.value = false;
112
116
  parentRecord.value = data.data?.[0] || null;
@@ -73,6 +73,7 @@ async function getParentRecord() {
73
73
  console.warn('No parent resource or reference column found');
74
74
  parentRecord.value = null;
75
75
  loading.value = false;
76
+ return;
76
77
  }
77
78
 
78
79
  const foreignKeyValue = props.record[parentResourceRefColumn.value.name];
@@ -80,6 +81,7 @@ async function getParentRecord() {
80
81
  console.warn('No foreign key value found in the record', props.record);
81
82
  parentRecord.value = null;
82
83
  loading.value = false;
84
+ return;
83
85
  }
84
86
 
85
87
  const data = await callAdminForthApi({
@@ -102,11 +104,13 @@ async function getParentRecord() {
102
104
  console.error('No data returned from API', data);
103
105
  parentRecord.value = null;
104
106
  loading.value = false;
107
+ return;
105
108
  }
106
109
  if (data.error) {
107
110
  showErrorTost(data.error);
108
111
  parentRecord.value = null;
109
112
  loading.value = false;
113
+ return;
110
114
  }
111
115
  loading.value = false;
112
116
  parentRecord.value = data.data?.[0] || null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/foreign-inline-show",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "AdminForth plugin for adding show of parent item to the child items show page",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",