This commit is contained in:
Jan Prochazka
2021-01-23 07:22:09 +01:00
parent 37cc86f8d2
commit 451af5d09f
141 changed files with 763 additions and 787 deletions

View File

@@ -27,16 +27,16 @@ export default function MarkdownEditorTab({ tabid, tabVisible, toolbarPortalRef,
const showPreview = async () => {
await saveToStorage();
const existing = (openedTabs || []).find((x) => x.props && x.props.sourceTabId == tabid && x.closedTime == null);
const existing = (openedTabs || []).find(x => x.props && x.props.sourceTabId == tabid && x.closedTime == null);
if (existing) {
setOpenedTabs((tabs) =>
tabs.map((x) => ({
setOpenedTabs(tabs =>
tabs.map(x => ({
...x,
selected: x.tabid == existing.tabid,
}))
);
} else {
const thisTab = (openedTabs || []).find((x) => x.tabid == tabid);
const thisTab = (openedTabs || []).find(x => x.tabid == tabid);
openNewTab({
title: thisTab.title,
icon: 'img preview',