@adminforth/rich-editor 2.0.16 → 2.0.17

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
@@ -10,5 +10,5 @@ custom/package.json
10
10
  custom/quillEditor.vue
11
11
  custom/tsconfig.json
12
12
 
13
- sent 35,541 bytes received 115 bytes 71,312.00 bytes/sec
14
- total size is 35,118 speedup is 0.98
13
+ sent 35,535 bytes received 115 bytes 71,300.00 bytes/sec
14
+ total size is 35,118 speedup is 0.99
package/dist/index.js CHANGED
@@ -221,6 +221,9 @@ export default class RichEditorPlugin extends AdminForthPlugin {
221
221
  handler: (_a) => __awaiter(this, [_a], void 0, function* ({ body, headers }) {
222
222
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
223
223
  const { record } = body;
224
+ if (!record) {
225
+ return { completion: [] };
226
+ }
224
227
  if (this.rateLimiter) {
225
228
  // rate limit
226
229
  // const { error } = RateLimiter.checkRateLimit(
package/index.ts CHANGED
@@ -277,6 +277,10 @@ export default class RichEditorPlugin extends AdminForthPlugin {
277
277
  handler: async ({ body, headers }) => {
278
278
  const { record } = body;
279
279
 
280
+ if (!record) {
281
+ return { completion: [] };
282
+ }
283
+
280
284
  if (this.rateLimiter) {
281
285
  // rate limit
282
286
  // const { error } = RateLimiter.checkRateLimit(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/rich-editor",
3
- "version": "2.0.16",
3
+ "version": "2.0.17",
4
4
  "description": "Rich editor plugin for adminforth",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",