File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
packages/engine-twig-php/lib Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -61,9 +61,17 @@ const engine_twig_php = {
61
61
62
62
renderPattern ( pattern , data ) {
63
63
return new Promise ( ( resolve , reject ) => {
64
- const patternPath = path . isAbsolute ( pattern . relPath )
65
- ? path . relative ( patternLabConfig . paths . source . root , pattern . relPath )
64
+ // If this is a pseudo pattern the relPath will be incorrect.
65
+ // i.e. /path/to/pattern.json
66
+ // Twig can't render that file so we need to use the base patterns
67
+ // relPath instead.
68
+ const relPath = pattern . isPseudoPattern
69
+ ? pattern . basePattern . relPath
66
70
: pattern . relPath ;
71
+
72
+ const patternPath = path . isAbsolute ( relPath )
73
+ ? path . relative ( patternLabConfig . paths . source . root , relPath )
74
+ : relPath ;
67
75
// console.log(patternPath);
68
76
69
77
let details = '' ;
You can’t perform that action at this time.
0 commit comments