discourse/app/assets/javascripts/admin/helpers/check-icon.js
Robin Ward d615de9139
DEV: Support for import Handlebars from 'handlebars'; (#9600)
* Remove Handlebars.SafeString usage

* DEV: Support for `import Handlebars from 'handlebars'`;

* FIX: Sprockets was broken when `node_modules` was present

By default the old version of sprockets looks for application.js
anywhere, including in a node_modules folder if this exists
(which it will when we move to Ember CLI.)
2020-04-30 16:41:02 -04:00

9 lines
312 B
JavaScript

import { registerUnbound } from "discourse-common/lib/helpers";
import { renderIcon } from "discourse-common/lib/icon-library";
import { htmlSafe } from "@ember/template";
registerUnbound("check-icon", function(value) {
let icon = value ? "check" : "times";
return htmlSafe(renderIcon("string", icon));
});