Skip to content

Commit

Permalink
fix(prettier-plugin): fix undefined error edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
bryceosterhaus committed May 28, 2024
1 parent 259b50a commit 6150b31
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 6150b31

Please sign in to comment.