From f435e73ec1136b5caece1e1c171094ffed66af43 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 27 Jan 2024 17:07:17 -0500 Subject: [PATCH] Remove noop entries. The noop entries are not actually implemented in organic so it wouldn't make sense for them to be rendered in the UI. --- src/OrgAst.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/OrgAst.tsx b/src/OrgAst.tsx index 8ee5dca..f26245a 100644 --- a/src/OrgAst.tsx +++ b/src/OrgAst.tsx @@ -139,6 +139,9 @@ const OrgPropertiesList = (props: { return 0; } }) + .filter((entry) => { + return !(is_object(entry[1]) && entry[1]["noop"] == "Noop"); + }) .map(([key, value]) => { return ( @@ -156,4 +159,8 @@ const OrgPropertiesList = (props: { ); }; +function is_object(val: any): boolean { + return (val instanceof Object && !(val instanceof Array)); +} + export default OrgAst;