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

Commit a417eec

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

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/js/embeds.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,11 @@
235235
} catch(e) {}
236236
})();
237237

238-
window.console.log((responseJSON && responseJSON.error) || jqXHR.status || errorThrown.message);
238+
if (typeof window.console !== 'undefined') {
239+
window.console.log((responseJSON && responseJSON.error) || jqXHR.status || errorThrown.message);
240+
} else {
241+
window.alert('Error requesting media from ' + that.options.oembedProxy + ' to insert: ' + errorThrown + ' (
242+
}
239243

240244
$.proxy(that, 'convertBadEmbed', url)();
241245
}

0 commit comments

Comments
 (0)