FIX: Wizard tests don't need `Discourse` defined

This commit is contained in:
Robin Ward 2017-09-01 12:26:42 -04:00
parent c6ff387ce9
commit dfe347fb1d
1 changed files with 4 additions and 1 deletions

View File

@ -31,7 +31,10 @@ export function iconNode(id, params) {
return renderIcon('node', id, params);
}
Discourse.__widget_helpers.iconNode = iconNode;
// TODO: Improve how helpers are registered for vdom compliation
if (typeof Discourse !== "undefined") {
Discourse.__widget_helpers.iconNode = iconNode;
}
export function registerIconRenderer(renderer) {
_renderers.unshift(renderer);