We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 83a6ad4 + 257019a commit cc0d797Copy full SHA for cc0d797
1 file changed
packages/engine-twig-php/lib/engine_twig_php.js
@@ -61,9 +61,17 @@ const engine_twig_php = {
61
62
renderPattern(pattern, data) {
63
return new Promise((resolve, reject) => {
64
- const patternPath = path.isAbsolute(pattern.relPath)
65
- ? path.relative(patternLabConfig.paths.source.root, pattern.relPath)
+ // If this is a pseudo pattern the relPath will be incorrect.
+ // 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
70
: pattern.relPath;
71
+
72
+ const patternPath = path.isAbsolute(relPath)
73
+ ? path.relative(patternLabConfig.paths.source.root, relPath)
74
+ : relPath;
75
// console.log(patternPath);
76
77
let details = '';
0 commit comments