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.
1 parent 00c2ced commit b39b689Copy full SHA for b39b689
lib/public/livereload.js
@@ -997,8 +997,19 @@ __less = LessPlugin = (function() {
997
}
998
return false;
999
};
1000
+ LessPlugin.prototype.clearGeneratedStyles = function() {
1001
+ var _i, _ref, style;
1002
+ _ref = document.getElementsByTagName('style');
1003
+ for (var _i = _ref.length - 1; _i >= 0; _i--) {
1004
+ style = _ref[_i];
1005
+ if (style.id && style.id.match(/less\:/)) {
1006
+ style.parentNode.removeChild(style);
1007
+ }
1008
+ };
1009
1010
LessPlugin.prototype.reloadLess = function(path) {
1011
var link, links, _i, _len;
1012
+ this.clearGeneratedStyles();
1013
links = (function() {
1014
var _i, _len, _ref, _results;
1015
_ref = document.getElementsByTagName('link');
0 commit comments