dynamic image modal api: fix patch

This commit is contained in:
sadan 2026-02-04 22:34:03 -05:00
parent fbe587fe55
commit 29784ed997
No known key found for this signature in database

View file

@ -14,7 +14,8 @@ export default definePlugin({
description: "Allows you to omit either width or height when opening an image modal",
patches: [
{
find: ".renderLinkComponent)?",
// TODO: bundler compat
find: /\.renderLinkComponent[)?]\?/,
replacement: {
// widthAndHeightPassed = w != null && w !== 0 && h == null || h === 0
match: /(?<=\i=)(null!=\i&&0!==\i)&&(null!=\i&&0!==\i)/,