@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 +3 -0
- package/index.ts +4 -0
- package/package.json +1 -1
- package/pnpm-workspace.yaml +2 -0
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
package/pnpm-workspace.yaml
CHANGED