Fixed issue in the preview button when creating new objects
authorMarcel Werk <burntime@woltlab.com>
Fri, 6 Dec 2024 12:17:08 +0000 (13:17 +0100)
committerMarcel Werk <burntime@woltlab.com>
Fri, 6 Dec 2024 12:17:08 +0000 (13:17 +0100)
com.woltlab.wcf/templates/shared_wysiwygPreviewFormButton.tpl

index f5ef33fc6d4e43993d1244dac683b943278e0a50..5bd025708d6c59818a0f57f486ac6428a2af57c9 100644 (file)
@@ -11,7 +11,7 @@
                        '{unsafe:$button->getPrefixedWysiwygId()|encodeJS}',
                        '{unsafe:$button->getPrefixedId()|encodeJS}',
                        '{unsafe:$button->getObjectType()->objectType|encodeJS}',
-                       '{unsafe:$button->getObjectId()|encodeJS}'
+                       '{if $button->getObjectId()}{unsafe:$button->getObjectId()|encodeJS}{/if}'
                );
        });
 </script>