Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Commit

Permalink
Fix #195
Browse files Browse the repository at this point in the history
  • Loading branch information
mquandalle committed Dec 26, 2015
1 parent ec09840 commit bdef95a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/jade/plugin/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ class JadeCompilerPlugin extends CachingCompiler {
}

compileResultSize(compileResult) {
function lengthOrZero(field) {
return field ? field.length : 0;
}
return lengthOrZero(compileResult.head) + lengthOrZero(compileResult.body) +
lengthOrZero(compileResult.templates);
let n = 0;
n += Object.keys(compileResult.templates || {}).length;
n += compileResult.head ? 1 : 0;
n += compileResult.body ? 1 : 0;
return n;
}

_getMode(file) {
Expand Down

0 comments on commit bdef95a

Please sign in to comment.