FIX: Move makeArray to discourse-common

This commit is contained in:
Robin Ward
2019-11-01 13:06:50 -04:00
parent 6300ac699a
commit dceb72bc69
17 changed files with 23 additions and 22 deletions

View File

@ -1,5 +1,12 @@
import { get } from "@ember/object";
export function makeArray(obj) {
if (obj === null || obj === undefined) {
return [];
}
return Array.isArray(obj) ? obj : [obj];
}
export function htmlHelper(fn) {
return Ember.Helper.helper(function(...args) {
args =