@plasmicapp/loader-react 1.0.198 → 1.0.200

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1207,6 +1207,12 @@ function getCompMetas(metas, lookup) {
1207
1207
  return _extends({}, meta, {
1208
1208
  params: match.params
1209
1209
  });
1210
+ }).sort(function (meta1, meta2) {
1211
+ return (// We sort the matched component metas by the number of path params, so
1212
+ // if there are two pages `/products/foo` and `/products/[slug]`,
1213
+ // the first one will have higher precedence.
1214
+ Array.from(Object.keys(meta1.params || {})).length - Array.from(Object.keys(meta2.params || {})).length
1215
+ );
1210
1216
  });
1211
1217
  }
1212
1218
  function getLookupSpecName(lookup) {