@adminforth/rich-editor 1.6.0 → 1.6.1
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 -3
- package/index.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -18,14 +18,14 @@ import * as cheerio from 'cheerio';
|
|
|
18
18
|
// },
|
|
19
19
|
export default class RichEditorPlugin extends AdminForthPlugin {
|
|
20
20
|
constructor(options) {
|
|
21
|
-
var _a, _b;
|
|
21
|
+
var _a, _b, _c;
|
|
22
22
|
super(options, import.meta.url);
|
|
23
23
|
this.resourceConfig = undefined;
|
|
24
24
|
this.activationOrder = 100000;
|
|
25
25
|
this.attachmentResource = undefined;
|
|
26
26
|
this.options = options;
|
|
27
|
-
if ((_a = this.options.completion
|
|
28
|
-
this.rateLimiter = new RateLimiter((
|
|
27
|
+
if ((_b = (_a = this.options.completion) === null || _a === void 0 ? void 0 : _a.rateLimit) === null || _b === void 0 ? void 0 : _b.limit) {
|
|
28
|
+
this.rateLimiter = new RateLimiter((_c = this.options.completion.rateLimit) === null || _c === void 0 ? void 0 : _c.limit);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
modifyResourceConfig(adminforth, resourceConfig) {
|
package/index.ts
CHANGED
|
@@ -30,7 +30,7 @@ export default class RichEditorPlugin extends AdminForthPlugin {
|
|
|
30
30
|
constructor(options: PluginOptions) {
|
|
31
31
|
super(options, import.meta.url);
|
|
32
32
|
this.options = options;
|
|
33
|
-
if (this.options.completion
|
|
33
|
+
if (this.options.completion?.rateLimit?.limit) {
|
|
34
34
|
this.rateLimiter = new RateLimiter(this.options.completion.rateLimit?.limit);
|
|
35
35
|
}
|
|
36
36
|
}
|