Skip to content

Commit

Permalink
fix(converter.js): add error if the passed argument is not an object
Browse files Browse the repository at this point in the history
  • Loading branch information
tivie committed Jun 3, 2015
1 parent 33f64f6 commit d86ed45
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ showdown.Converter = function (converterOptions) {
options[opt] = converterOptions[opt];
}
}
} else {
throw Error('Converter expects the passed parameter to be an object, but ' + typeof converterOptions +
' was passed instead.')
}

if (options.extensions) {
Expand Down

0 comments on commit d86ed45

Please sign in to comment.