api/redraw, console check for IE9 compat.

This commit is contained in:
Pierre-Yves Gérardy 2017-09-25 17:03:48 +02:00 committed by GitHub
parent 6c6caa1b57
commit 8a4280eb42

View file

@ -41,7 +41,7 @@ module.exports = function($window, throttleMock) {
function sync() {
if (rendering) throw new Error("Nested m.redraw.sync() call")
rendering = true
for (var i = 1; i < callbacks.length; i+=2) try {callbacks[i]()} catch (e) {console.error(e)}
for (var i = 1; i < callbacks.length; i+=2) try {callbacks[i]()} catch (e) {if (typeof console !== "undefined") console.error(e)}
rendering = false
}