Skip to content

Commit eafb7bf

Browse files
committed
fix: add optional chaining for rate limit check in constructor
1 parent c20a305 commit eafb7bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default class RichEditorPlugin extends AdminForthPlugin {
3030
constructor(options: PluginOptions) {
3131
super(options, import.meta.url);
3232
this.options = options;
33-
if (this.options.completion.rateLimit?.limit) {
33+
if (this.options.completion?.rateLimit?.limit) {
3434
this.rateLimiter = new RateLimiter(this.options.completion.rateLimit?.limit);
3535
}
3636
}

0 commit comments

Comments
 (0)