@adminforth/text-complete 2.0.22 → 2.0.23
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 +1 -1
- package/dist/index.js +3 -0
- package/index.ts +3 -0
- package/package.json +1 -1
package/build.log
CHANGED
package/dist/index.js
CHANGED
|
@@ -82,6 +82,9 @@ export default class TextCompletePlugin extends AdminForthPlugin {
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
const { record } = body;
|
|
85
|
+
if (!record) {
|
|
86
|
+
return { completion: [] };
|
|
87
|
+
}
|
|
85
88
|
const recordNoField = Object.assign({}, record);
|
|
86
89
|
delete recordNoField[this.options.fieldName];
|
|
87
90
|
let currentVal = record[this.options.fieldName];
|
package/index.ts
CHANGED
|
@@ -98,6 +98,9 @@ export default class TextCompletePlugin extends AdminForthPlugin {
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
const { record } = body;
|
|
101
|
+
if (!record) {
|
|
102
|
+
return { completion: [] };
|
|
103
|
+
}
|
|
101
104
|
const recordNoField = {...record};
|
|
102
105
|
delete recordNoField[this.options.fieldName];
|
|
103
106
|
let currentVal = record[this.options.fieldName];
|