Skip to content

Commit

Permalink
Fix type error: safer deep object properties to guard against malform…
Browse files Browse the repository at this point in the history
…ed input. Resolves #4
  • Loading branch information
danmactough committed Aug 2, 2014
1 parent e50b3bc commit 6dc1044
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.js
Expand Up @@ -182,7 +182,7 @@ OpmlParser.prototype.handleCloseTag = function (el) {
}

if (n['#isoutline']) { // We have an outline node
if (!this.meta.title) { // We haven't yet parsed all the metadata
if (!this.meta.title && this.stack[1] && this.stack[1].head) { // We haven't yet parsed all the metadata
utils.merge(this.meta, this.handleMeta(this.stack[1].head), true);
}
if (!baseurl && this.xmlbase && this.xmlbase.length) { // handleMeta was able to infer a baseurl without xml:base or options.feedurl
Expand Down

0 comments on commit 6dc1044

Please sign in to comment.