pl-fe: Remove some immutable usage

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-11-05 23:32:43 +01:00
parent f560896311
commit 563e5288fb
41 changed files with 482 additions and 463 deletions

View File

@ -37,7 +37,7 @@ const messages = defineMessages({
});
interface IUploadButton {
onSelectFile: (src: string) => void;
onSelectFile: (src: string) => void;
}
const UploadButton: React.FC<IUploadButton> = ({ onSelectFile }) => {

View File

@ -40,7 +40,7 @@ const StatePlugin: React.FC<IStatePlugin> = ({ composeId, isWysiwyg }) => {
for (const id of ids) {
if (compose?.dismissed_quotes.includes(id)) continue;
if (state.statuses.get(id)) {
if (state.statuses[id]) {
quoteId = id;
break;
}

View File

@ -9,7 +9,7 @@ import { ElementNode, RangeSelection, TextNode } from 'lexical';
export const getSelectedNode = (
selection: RangeSelection,
): TextNode | ElementNode => {
): TextNode | ElementNode => {
const anchor = selection.anchor;
const focus = selection.focus;
const anchorNode = selection.anchor.getNode();