Skip to content

Commit ca77a45

Browse files
committed
using relPath in getPartial instead of string concat
1 parent e3e88dd commit ca77a45

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

core/lib/pattern_assembler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ var pattern_assembler = function () {
2929
//else look by verbose syntax
3030
for (var i = 0; i < patternlab.patterns.length; i++) {
3131
switch (partialName) {
32+
case patternlab.patterns[i].relPath:
3233
case patternlab.patterns[i].subdir + '/' + patternlab.patterns[i].fileName:
33-
case patternlab.patterns[i].subdir + '/' + patternlab.patterns[i].fileName + '.mustache':
3434
return patternlab.patterns[i];
3535
}
3636
}

test/parameter_hunter_tests.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//setup current pattern from what we would have during execution
77
function currentPatternClosure() {
88
return {
9+
"relPath": "02-organisms/02-comments/01-sticky-comment.mustache",
910
"fileName": "01-sticky-comment",
1011
"subdir": "02-organisms/02-comments",
1112
"name": "02-organisms-02-comments-01-sticky-comment",
@@ -28,6 +29,7 @@
2829
return {
2930
patterns: [
3031
{
32+
"relPath": "01-molecules/06-components/02-single-comment.mustache",
3133
"fileName": "02-single-comment",
3234
"subdir": "01-molecules/06-components",
3335
"name": "01-molecules-06-components-02-single-comment",

0 commit comments

Comments
 (0)