Skip to content

Commit 893a05b

Browse files
committed
fix an order of operations problem
pattern link assignment and pattern processing were transposed at some point, despite what the comments stated fixes pattern-lab/edition-node-gulp#102
1 parent 98dcef4 commit 893a05b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/lib/patternlab.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,10 @@ var patternlab_engine = function (config) {
528528

529529
patternlab.events.emit('patternlab-pattern-iteration-end', patternlab);
530530

531+
//now that all the main patterns are known, look for any links that might be within data and expand them
532+
//we need to do this before expanding patterns & partials into extendedTemplates, otherwise we could lose the data -> partial reference
533+
pattern_assembler.parse_data_links(patternlab);
534+
531535
//diveSync again to recursively include partials, filling out the
532536
//extendedTemplate property of the patternlab.patterns elements
533537
// TODO we can reduce the time needed by only processing changed patterns and their partials
@@ -537,10 +541,6 @@ var patternlab_engine = function (config) {
537541
processHeadPattern();
538542
processFootPattern();
539543

540-
//now that all the main patterns are known, look for any links that might be within data and expand them
541-
//we need to do this before expanding patterns & partials into extendedTemplates, otherwise we could lose the data -> partial reference
542-
pattern_assembler.parse_data_links(patternlab);
543-
544544
//cascade any patternStates
545545
lineage_hunter.cascade_pattern_states(patternlab);
546546

0 commit comments

Comments
 (0)