mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 00:32:52 +08:00
FIX: Move makeArray
to discourse-common
This commit is contained in:
@ -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 =
|
||||
|
Reference in New Issue
Block a user