From f6afd62621d9de6004112c80b8e66f2820fb02bf Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Tue, 13 Jun 2023 15:24:54 -0400 Subject: [PATCH] subset plugin: fallback if unit cannot be found * introduced by #2127: spatial subsets crashed when trying to display the unit in the subset plugin, this now implements a fallback to not show the unit suffix --- jdaviz/configs/default/plugins/subset_plugin/subset_plugin.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdaviz/configs/default/plugins/subset_plugin/subset_plugin.vue b/jdaviz/configs/default/plugins/subset_plugin/subset_plugin.vue index 515a40723b..e3d0080d0d 100644 --- a/jdaviz/configs/default/plugins/subset_plugin/subset_plugin.vue +++ b/jdaviz/configs/default/plugins/subset_plugin/subset_plugin.vue @@ -83,7 +83,7 @@ v-model.number="item.value" type="number" style="padding-top: 0px; margin-top: 0px" - :suffix="item.unit.replace('Angstrom', 'A')" + :suffix="item.unit ? item.unit.replace('Angstrom', 'A') : ''" >