MessageTranslate: Fix Empty Message
This commit is contained in:
parent
93c7559e12
commit
4b1c3eeaba
2 changed files with 4 additions and 5 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "equicord",
|
||||
"private": "true",
|
||||
"version": "1.15.0.1",
|
||||
"version": "1.15.0.2",
|
||||
"description": "The other cutest Discord client mod",
|
||||
"homepage": "https://github.com/Equicord/Equicord#readme",
|
||||
"bugs": {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
import "./styles.css";
|
||||
|
||||
import ErrorBoundary from "@components/ErrorBoundary";
|
||||
import { TranslateIcon } from "@plugins/translate/TranslateIcon";
|
||||
import { EquicordDevs } from "@utils/constants";
|
||||
import { classNameFactory } from "@utils/css";
|
||||
|
|
@ -67,7 +66,7 @@ export default definePlugin({
|
|||
},
|
||||
{
|
||||
match: /\i\.memo\(function\((\i)\)\{(?=let \i,\i)/,
|
||||
replace: "$&$1.message=$self.transformMessage($1.message);",
|
||||
replace: "$&$1.message=$self.transformMessage($1?.message);",
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
@ -109,7 +108,7 @@ export default definePlugin({
|
|||
return message;
|
||||
},
|
||||
|
||||
wrapContent: ErrorBoundary.wrap(({ content, messageId, channelId }) => {
|
||||
wrapContent(content, messageId, channelId) {
|
||||
const sourceLang = translatedMessages.get(messageId);
|
||||
const cached = getCached(messageId);
|
||||
if (!sourceLang || !cached) return content;
|
||||
|
|
@ -148,5 +147,5 @@ export default definePlugin({
|
|||
</>
|
||||
);
|
||||
}
|
||||
}, { noop: true }),
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue