Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Commit 2273e62

Browse files
committed
re #140: Console.log not always defined in IE
1 parent df2320b commit 2273e62

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

dist/js/medium-editor-insert-plugin.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,11 @@ this["MediumInsert"]["Templates"]["src/js/templates/images-toolbar.hbs"] = Handl
804804
} catch(e) {}
805805
})();
806806

807-
window.console.log((responseJSON && responseJSON.error) || jqXHR.status || errorThrown.message);
807+
if (typeof window.console !== 'undefined') {
808+
window.console.log((responseJSON && responseJSON.error) || jqXHR.status || errorThrown.message);
809+
} else {
810+
window.alert('Error requesting media from ' + that.options.oembedProxy + ' to insert: ' + errorThrown + ' (response status: ' + jqXHR.status + ')');
811+
}
808812

809813
$.proxy(that, 'convertBadEmbed', url)();
810814
}

0 commit comments

Comments
 (0)