DEV: resets csrf ajax prefilter only if present (#7747)

This commit is contained in:
Joffrey JAFFEUX
2019-06-11 12:50:20 +02:00
committed by GitHub
parent ebf77f74b7
commit 6612218a4e
2 changed files with 19 additions and 4 deletions

View File

@ -16,6 +16,7 @@ import { resetDecorators } from "discourse/widgets/widget";
import { resetDecorators as resetPostCookedDecorators } from "discourse/widgets/post-cooked";
import { resetCache as resetOneboxCache } from "pretty-text/oneboxer";
import { resetCustomPostMessageCallbacks } from "discourse/controllers/topic";
import { resetCsrfCallbacks } from "discourse/initializers/csrf-token";
export function currentUser() {
return Discourse.User.create(
@ -128,6 +129,7 @@ export function acceptance(name, options) {
resetPostCookedDecorators();
resetOneboxCache();
resetCustomPostMessageCallbacks();
resetCsrfCallbacks();
Discourse.reset();
}
});