Handle non-string HTML passed to loadContent() (#200)
Fixes #187.
This commit was merged in pull request #200.
This commit is contained in:
6
index.js
6
index.js
@@ -117,6 +117,12 @@ Pjax.prototype = {
|
||||
},
|
||||
|
||||
loadContent: function(html, options) {
|
||||
if (typeof html !== "string") {
|
||||
trigger(document, "pjax:complete pjax:error", options);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var tmpEl = document.implementation.createHTMLDocument("pjax");
|
||||
|
||||
// parse HTML attributes to copy them
|
||||
|
||||
Reference in New Issue
Block a user