diff --git a/jdaviz/core/freezable_state.py b/jdaviz/core/freezable_state.py index e61aa3d3f7..54b47c6542 100644 --- a/jdaviz/core/freezable_state.py +++ b/jdaviz/core/freezable_state.py @@ -69,7 +69,7 @@ def _convert_units_y_limits(self, old_unit, new_unit): spectral_axis = x_corners * u.Unit(self.x_display_unit) for layer in self.layers: - if psc := layer.layer.meta.get('_pixel_scale_factor', None) is not None: + if psc := getattr(layer.layer, 'meta', {}).get('_pixel_scale_factor', None) is not None: spectral_axis.info.meta = {'_pixel_scale_factor', psc} break