Skip to content

Commit 0de8279

Browse files
Merge pull request #500 from tommcc/fix_relative_depth_check
Fix relativeDepth check
2 parents 3772f53 + 1076398 commit 0de8279

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/lib/pattern_assembler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ var pattern_assembler = function () {
242242

243243
function processPatternIterative(relPath, patternlab) {
244244

245-
var relativeDepth = relPath.match(/\w(?=\\)|\w(?=\/)/g || []).length;
245+
var relativeDepth = (relPath.match(/\w(?=\\)|\w(?=\/)/g) || []).length;
246246
if (relativeDepth > 2) {
247247
console.log('');
248248
plutils.logOrange('Warning:');

0 commit comments

Comments
 (0)