mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
clean up callbacks during acceptance tests
This commit is contained in:
@@ -16,6 +16,10 @@ import { userPath } from 'discourse/lib/url';
|
||||
|
||||
const customPostMessageCallbacks = {};
|
||||
|
||||
export function resetCustomPostMessageCallbacks() {
|
||||
customPostMessageCallbacks = {};
|
||||
}
|
||||
|
||||
export function registerCustomPostMessageCallback(type, callback) {
|
||||
if (customPostMessageCallbacks[type]) {
|
||||
throw `Error ${type} is an already registered post message!`;
|
||||
|
||||
Reference in New Issue
Block a user