mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Improving "get" method for widgets
This commit is contained in:
parent
eceab5a444
commit
0d099243cf
@ -36,7 +36,7 @@ exports.get = function (id) {
|
||||
}
|
||||
|
||||
var node = typeof id === 'string' ? document.getElementById(id) : id;
|
||||
return node.__widget || null;
|
||||
return (node && node.__widget) || null;
|
||||
};
|
||||
exports.initAllWidgets = function() {
|
||||
initWidgets.initServerRendered(true /* scan DOM */);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user