Browse Source

fix count words

Nicolas Cannasse 4 years ago
parent
commit
ffe8e00da6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      hide/view/Script.hx

+ 1 - 1
hide/view/Script.hx

@@ -29,7 +29,7 @@ class Script extends FileView {
 						if( text != "" ) {
 							var n = text.split(" ").length;
 							count += n;
-							category.count += n;
+							if( category != null ) category.count += n;
 						}
 					case Document:
 						for( x in x )