core&ui: cors (#498)

This commit is contained in:
undefined authored and GitHub committed 2023-01-27 23:22:58 +08:00
1 parent 46eb761079
commit d8f5193a24
10 files changed
+135 -76

No files matched your search

+1 -1
View File
@@ -153,7 +153,7 @@ class RichMediaHandler extends Handler {
async post({ domainId, items }) {
const res = [];
for (const item of items) {
for (const item of items || []) {
if (item.domainId && item.domainId === domainId) delete item.domainId;
if (item.type === 'user') res.push(this.renderUser(domainId, item).catch(() => ''));
else if (item.type === 'problem') res.push(this.renderProblem(domainId, item).catch(() => ''));