mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
fix(converter.js): add error if the passed argument is not an object
This commit is contained in:
parent
33f64f60c9
commit
d86ed450a8
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user