feat: add first-class support for CJK (#8530)

This commit is contained in:
Marcel Mraz 2024-10-17 21:14:17 +03:00 committed by GitHub
parent 21815fb930
commit b479f3bd65
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
288 changed files with 3559 additions and 918 deletions

View file

@ -2150,11 +2150,12 @@ class App extends React.Component<AppProps, AppState> {
editingTextElement = null;
}
this.setState((state) => {
// using Object.assign instead of spread to fool TS 4.2.2+ into
// regarding the resulting type as not containing undefined
// (which the following expression will never contain)
return Object.assign(actionResult.appState || {}, {
this.setState((prevAppState) => {
const actionAppState = actionResult.appState || {};
return {
...prevAppState,
...actionAppState,
// NOTE this will prevent opening context menu using an action
// or programmatically from the host, so it will need to be
// rewritten later
@ -2165,7 +2166,7 @@ class App extends React.Component<AppProps, AppState> {
theme,
name,
errorMessage,
});
};
});
didUpdate = true;