We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 68aab24 + 1ec0bf3 commit 024e378Copy full SHA for 024e378
lib/marked.js
@@ -1214,6 +1214,14 @@ function merge(obj) {
1214
*/
1215
1216
function marked(src, opt, callback) {
1217
+ // throw error in case of non string input
1218
+ if (typeof src == 'undefined' || src === null)
1219
+ throw new Error('marked(): input parameter is undefined or null');
1220
+ if (typeof src != 'string')
1221
+ throw new Error('marked(): input parameter is of type ' +
1222
+ Object.prototype.toString.call(src) + ', string expected');
1223
+
1224
1225
if (callback || typeof opt === 'function') {
1226
if (!callback) {
1227
callback = opt;
0 commit comments