@adminforth/rich-editor 2.0.15 → 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/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.15",
3
+ "version": "2.0.17",
4
4
  "description": "Rich editor plugin for adminforth",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,2 +1,4 @@
1
1
  allowBuilds:
2
2
  adminforth: true
3
+ minimumReleaseAgeExclude:
4
+ - adminforth