fix #1888 csslint worker gives error for empty file

This commit is contained in:
nightwing 2014-03-31 20:31:20 +04:00
commit 5ef28b7e11

View file

@ -76,6 +76,8 @@ oop.inherits(Worker, Mirror);
this.onUpdate = function() {
var value = this.doc.getValue();
if (!value)
return this.sender.emit("csslint", []);
var infoRules = this.infoRules;
var result = CSSLint.verify(value, this.ruleset);