fix canary crashing

This commit is contained in:
Vendicated 2023-12-21 23:41:12 +01:00
parent fdf3480b27
commit 686f2d925f
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18
2 changed files with 3 additions and 2 deletions

View file

@ -45,8 +45,8 @@ export default definePlugin({
{ {
find: ".embedWrapper,embed", find: ".embedWrapper,embed",
replacement: [{ replacement: [{
match: /\.embedWrapper/g, match: /\.embedWrapper(?=.+?channel_id:(\i)\.id)/g,
replace: "$&+(this.props.channel.nsfw?' vc-nsfw-img':'')" replace: "$&+($1.nsfw?' vc-nsfw-img':'')"
}] }]
} }
], ],

View file

@ -328,6 +328,7 @@ export default definePlugin({
// Attachment renderer // Attachment renderer
// Module 96063 // Module 96063
find: ".removeAttachmentHoverButton", find: ".removeAttachmentHoverButton",
group: true,
replacement: [ replacement: [
{ {
match: /(className:\i,attachment:\i),/, match: /(className:\i,attachment:\i),/,