improve error message
This commit is contained in:
parent
8214d56411
commit
675f66a44b
1 changed files with 1 additions and 1 deletions
|
|
@ -503,7 +503,7 @@ var m = (function app(window, undefined) {
|
|||
var nodeCache = [], cellCache = {};
|
||||
m.render = function(root, cell, forceRecreation) {
|
||||
var configs = [];
|
||||
if (!root) throw new Error("Please ensure the DOM element exists before rendering a template into it.");
|
||||
if (!root) throw new Error("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");
|
||||
var id = getCellCacheKey(root);
|
||||
var isDocumentRoot = root === $document;
|
||||
var node = isDocumentRoot || root === $document.documentElement ? documentNode : root;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue