DEV: Loading sanitizer was deprecated 6 years ago (#61)

in 3d21805022
This commit is contained in:
Jarek Radosz 2022-07-13 01:30:10 +02:00 committed by GitHub
parent d423b40bad
commit d4fe487e8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 17 deletions

View File

@ -1,25 +1,22 @@
import showModal from "discourse/lib/show-modal"; import showModal from "discourse/lib/show-modal";
import loadScript from "discourse/lib/load-script";
export function showUserNotes(store, userId, callback, opts) { export function showUserNotes(store, userId, callback, opts) {
opts = opts || {}; opts = opts || {};
return loadScript("defer/html-sanitizer-bundle").then(() => { return store.find("user-note", { user_id: userId }).then((model) => {
return store.find("user-note", { user_id: userId }).then((model) => { const controller = showModal("user-notes", {
const controller = showModal("user-notes", { model,
model, title: "user_notes.title",
title: "user_notes.title", addModalBodyView: true,
addModalBodyView: true,
});
controller.reset();
controller.setProperties({
userId,
callback,
postId: opts.postId,
});
return controller;
}); });
controller.reset();
controller.setProperties({
userId,
callback,
postId: opts.postId,
});
return controller;
}); });
} }