mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-08 05:57:02 +09:00
fix sentry crash
This commit is contained in:
parent
bec41f74e6
commit
751b35f542
3 changed files with 7 additions and 7 deletions
|
@ -72,12 +72,10 @@ let autoUpdate = false;
|
|||
if (is.development && !port) {
|
||||
console.error('ERROR: Please define SERVER_PORT env var');
|
||||
exit(false);
|
||||
return;
|
||||
};
|
||||
|
||||
if (!app.requestSingleInstanceLock() && app.isPackaged) {
|
||||
exit(false);
|
||||
return;
|
||||
};
|
||||
|
||||
storage.setDataPath(userPath);
|
||||
|
|
|
@ -101,8 +101,10 @@ const MenuOptionEdit = observer(class MenuOptionEdit extends React.Component<Pro
|
|||
};
|
||||
|
||||
getSections () {
|
||||
const colors = DataUtil.menuGetBgColors().filter((it: any) => { return it.id != 'bgColor-default'; });
|
||||
|
||||
return [
|
||||
{ children: DataUtil.menuGetBgColors() },
|
||||
{ children: colors },
|
||||
{
|
||||
children: [
|
||||
{ id: 'remove', icon: 'remove', name: translate('menuDataviewOptionEditDelete') }
|
||||
|
|
|
@ -59,7 +59,7 @@ const MenuItemFilter = observer(class MenuItemFilter extends React.Component<Pro
|
|||
|
||||
case I.RelationType.Tag:
|
||||
case I.RelationType.Status:
|
||||
list = (value || []).map((id: string) => {
|
||||
list = Relation.getArrayValue(value).map((id: string) => {
|
||||
return (relation.selectDict || []).find((it: any) => { return it.id == id; });
|
||||
});
|
||||
list = list.filter((it: any) => { return it && it.id; });
|
||||
|
@ -67,9 +67,9 @@ const MenuItemFilter = observer(class MenuItemFilter extends React.Component<Pro
|
|||
if (list.length) {
|
||||
v = (
|
||||
<React.Fragment>
|
||||
{list.map((item: any) => {
|
||||
return <Tag {...item} key={item.id} className={DataUtil.tagClass(relation.format)} />;
|
||||
})}
|
||||
{list.map((item: any) => (
|
||||
<Tag {...item} key={item.id} className={DataUtil.tagClass(relation.format)} />
|
||||
))}
|
||||
</React.Fragment>
|
||||
);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue