We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 606f96c commit 9442cf8Copy full SHA for 9442cf8
core/lib/object_factory.js
@@ -146,7 +146,16 @@ Pattern.prototype = {
146
// factory: creates an empty Pattern for miscellaneous internal use, such as
147
// by list_item_hunter
148
Pattern.createEmpty = function (customProps, patternlab) {
149
- var pattern = new Pattern('', null, patternlab);
+ let relPath = '';
150
+ if (customProps) {
151
+ if (customProps.relPath) {
152
+ relPath = customProps.relPath;
153
+ } else if (customProps.subdir && customProps.filename) {
154
+ relPath = customProps.subdir + path.sep + customProps.filename;
155
+ }
156
157
+
158
+ var pattern = new Pattern(relPath, null, patternlab);
159
return extend(pattern, customProps);
160
};
161
0 commit comments