浏览代码

Fixed an error through when there were no files to run on jshint.

fredck 11 年之前
父节点
当前提交
9cff9f4923
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      packages/ckeditor5-ui/dev/tasks/res/tools.js

+ 3 - 0
packages/ckeditor5-ui/dev/tasks/res/tools.js

@@ -10,6 +10,9 @@ module.exports = {
 		// Cache it, so it is executed only once when running multiple tasks.
 		// Cache it, so it is executed only once when running multiple tasks.
 		if ( !dirtyFiles ) {
 		if ( !dirtyFiles ) {
 			dirtyFiles = this.shExec( 'git diff-index --name-only HEAD' ).replace( /\s*$/, '' ).split( '\n' );
 			dirtyFiles = this.shExec( 'git diff-index --name-only HEAD' ).replace( /\s*$/, '' ).split( '\n' );
+			if ( dirtyFiles.length == 1 && !dirtyFiles[ 0 ] ) {
+				dirtyFiles = [];
+			}
 		}
 		}
 		return dirtyFiles;
 		return dirtyFiles;
 	},
 	},