Skip to content

Commit

Permalink
fix nullish coalescing
Browse files Browse the repository at this point in the history
  • Loading branch information
UziTech committed Aug 12, 2023
1 parent 3ce6941 commit ea79ad7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,8 @@ export class Marked {
}
default: {
const genericToken = token as Tokens.Generic;
const array = this.defaults.extensions?.childTokens?.[genericToken.type] ?? []
// Walk any extensions
array.forEach((childTokens) => {
if (this.defaults.extensions?.childTokens?.[genericToken.type]) {
this.defaults.extensions.childTokens[genericToken.type].forEach((childTokens) => {
values = values.concat(this.walkTokens(genericToken[childTokens], callback));
});
} else if (genericToken.tokens) {
Expand Down

0 comments on commit ea79ad7

Please sign in to comment.