chore(editor): no need to cache attachment embed config map (#10197)

### What's Changed!

* no need to cache attachment embed config map
This commit is contained in:
fundon
2025-02-17 04:21:00 +00:00
parent 594224e3b4
commit 378007da81
@@ -71,10 +71,11 @@ export class AttachmentEmbedService extends Extension {
return this.configs.values();
}
constructor(
private readonly std: BlockStdScope,
private readonly configs: Map<string, AttachmentEmbedConfig>
) {
get configs(): Map<string, AttachmentEmbedConfig> {
return this.std.get(AttachmentEmbedConfigMapIdentifier);
}
constructor(private readonly std: BlockStdScope) {
super();
}
@@ -82,10 +83,7 @@ export class AttachmentEmbedService extends Extension {
di.addImpl(AttachmentEmbedConfigMapIdentifier, provider =>
provider.getAll(AttachmentEmbedConfigIdentifier)
);
di.addImpl(AttachmentEmbedProvider, AttachmentEmbedService, [
StdIdentifier,
AttachmentEmbedConfigMapIdentifier,
]);
di.addImpl(AttachmentEmbedProvider, this, [StdIdentifier]);
}
// Converts to embed view.