Explorar el Código

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

fredck hace 11 años
padre
commit
9cff9f4923
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  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.
 		if ( !dirtyFiles ) {
 			dirtyFiles = this.shExec( 'git diff-index --name-only HEAD' ).replace( /\s*$/, '' ).split( '\n' );
+			if ( dirtyFiles.length == 1 && !dirtyFiles[ 0 ] ) {
+				dirtyFiles = [];
+			}
 		}
 		return dirtyFiles;
 	},