mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-20 06:22:50 +01:00
wrapper for grabbing components without modifiers
This commit is contained in:
@@ -20,6 +20,11 @@ var components = components || {};
|
||||
|
||||
components.get = function() {
|
||||
var args = Array.prototype.slice.call(arguments, 1);
|
||||
return components.core[arguments[0]].apply(this, args);
|
||||
|
||||
if (components.core[arguments[0]]) {
|
||||
return components.core[arguments[0]].apply(this, args);
|
||||
} else {
|
||||
return $('[component="' + arguments[0] + '"]');
|
||||
}
|
||||
};
|
||||
}());
|
||||
Reference in New Issue
Block a user