Skip to content

Commit

Permalink
Depreacate typeMatchers
Browse files Browse the repository at this point in the history
  • Loading branch information
Chalarangelo committed Jun 15, 2024
1 parent d4be69f commit 44c0ba9
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/blocks/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,14 +242,8 @@ export class Application {

// Populate collections
collections.forEach(collection => {
const {
snippetIds,
typeMatcher,
languageMatcher,
tagMatcher,
parent,
...rest
} = collection;
const { snippetIds, languageMatcher, tagMatcher, parent, ...rest } =
collection;
const collectionRec = Collection.createRecord({
parent,
featuredIndex: featuredListings.indexOf(collection.id),
Expand All @@ -264,11 +258,6 @@ export class Application {
// Use publishedBy in other listings to include unlisted snippets in order
// to allow for proper breadcrumbs to form for them
let queryScope = 'publishedByPopularity';
if (typeMatcher)
if (typeMatcher === 'article') {
queryScope = 'publishedByNew';
queryMatchers.push(snippet => snippet.type !== 'snippet');
} else queryMatchers.push(snippet => snippet.type === typeMatcher);
if (languageMatcher)
queryMatchers.push(
snippet =>
Expand Down

0 comments on commit 44c0ba9

Please sign in to comment.