From 339b178d22658f38e8d2d2128d07c0a090bf7678 Mon Sep 17 00:00:00 2001 From: raffazizzi Date: Tue, 9 Jul 2024 09:16:43 -0400 Subject: [PATCH] safer check for zapped classes when opening element attributes page. Fixes #167 --- src/containers/EditAttributes.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/containers/EditAttributes.js b/src/containers/EditAttributes.js index 4e0d32b..b2f3001 100644 --- a/src/containers/EditAttributes.js +++ b/src/containers/EditAttributes.js @@ -98,6 +98,7 @@ const mapStateToProps = (state, ownProps) => { // but if its module is selected, it may have been zapped. So include it. // BUT do not restore it if it's been explicitly deleted by the user. if (state.odd.localsource.json.modules.filter(m => m.ident === localClass.module)[0] + && state.odd.customization.json.classes._deleted && !state.odd.customization.json.classes._deleted.includes(className)) { return _computeAtts(localClass) }