@adminforth/rich-editor 1.2.2 → 1.2.3
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/README.md +1 -1
- package/build.log +1 -1
- package/dist/index.js +3 -0
- package/index.ts +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
|
|
5
5
|
Allows to add a rich text editor to your AdminForth text columns.
|
|
6
6
|
|
|
7
|
-
## For
|
|
7
|
+
## For usage, see [AdminForth RichEditor Documentation](https://adminforth.dev/docs/tutorial/Plugins/RichEditor/)
|
package/build.log
CHANGED
package/dist/index.js
CHANGED
|
@@ -101,6 +101,9 @@ export default class RichEditorPlugin extends AdminForthPlugin {
|
|
|
101
101
|
})));
|
|
102
102
|
});
|
|
103
103
|
const deleteAttachmentRecords = (adminforth, options, s3Paths, adminUser) => __awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
if (!s3Paths.length) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
104
107
|
const attachmentPrimaryKeyField = this.attachmentResource.columns.find(c => c.primaryKey);
|
|
105
108
|
const attachments = yield adminforth.resource(options.attachments.attachmentResource).list(Filters.IN(options.attachments.attachmentFieldName, s3Paths));
|
|
106
109
|
yield Promise.all(attachments.map((a) => __awaiter(this, void 0, void 0, function* () {
|
package/index.ts
CHANGED
|
@@ -122,7 +122,9 @@ export default class RichEditorPlugin extends AdminForthPlugin {
|
|
|
122
122
|
const deleteAttachmentRecords = async (
|
|
123
123
|
adminforth: IAdminForth, options: PluginOptions, s3Paths: string[], adminUser: AdminUser
|
|
124
124
|
) => {
|
|
125
|
-
|
|
125
|
+
if (!s3Paths.length) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
126
128
|
const attachmentPrimaryKeyField = this.attachmentResource.columns.find(c => c.primaryKey);
|
|
127
129
|
|
|
128
130
|
const attachments = await adminforth.resource(options.attachments.attachmentResource).list(
|