Skip to content

Commit

Permalink
Merge pull request #1214 from bryceosterhaus/plugBugs
Browse files Browse the repository at this point in the history
fix(prettier-plugin): fix undefined error edge case
  • Loading branch information
bryceosterhaus authored May 28, 2024
2 parents 259b50a + 6150b31 commit f52e198
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion projects/prettier-plugin/parsers.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ function transformParser(parserName, defaultParser) {
astFormat: 'liferay-style-ast',
parse: async (text, options) => {
try {
let plugins = options?.plugins || [];

/*
* We need to filter out our own plugin before calling default prettier
*/
const plugins = options.plugins.filter(
plugins = plugins.filter(
(plugin) => !plugin.printers['liferay-style-ast']
);

Expand Down

0 comments on commit f52e198

Please sign in to comment.