Skip to content

Commit

Permalink
Filter empty paramters from parsed extraPrintParameter
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Jan 10, 2025
1 parent 85bd20b commit db4a056
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/Print.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ class Print extends React.Component {
return res;
}, {});

const extraOptions = Object.fromEntries((this.props.theme.extraPrintParameters || "").split("&").map(entry => entry.split("=")));
const extraOptions = Object.fromEntries((this.props.theme.extraPrintParameters || "").split("&").filter(Boolean).map(entry => entry.split("=")));
const layouts = this.props.theme.print.filter(l => l.map).sort((a, b) => {
return a.name.localeCompare(b.name, undefined, {numeric: true});
});
Expand Down

0 comments on commit db4a056

Please sign in to comment.