don't be too eager at restoring style elements to prevent deadlocks

This commit is contained in:
tophf 2017-12-07 10:49:47 +03:00
parent 6d4689e559
commit 6e1a6d1ad6

View File

@ -493,9 +493,9 @@
restorationCounter = 0; restorationCounter = 0;
} }
lastRestorationTime = t; lastRestorationTime = t;
if (++restorationCounter > 100) { if (++restorationCounter > 10) {
console.error('Stylus stopped restoring userstyle elements after 100 failed attempts.\n' + sorting = false;
'Please report on https://github.com/openstyles/stylus/issues'); setTimeout(start, 1000);
return true; return true;
} }
} }