fix: make layout timing match old setup (#1743)

This commit is contained in:
Tobias Åström
2025-05-12 12:02:10 +02:00
committed by GitHub
parent c4473a3498
commit fd619dcd3a

View File

@@ -2,7 +2,7 @@ import useRpc from './useRpc';
export default function useLayout(model) {
const [layout, { validating, canCancel, canRetry }, longrunning] = useRpc(model, 'getLayout');
if (model?.pureLayout) {
if (model?.pureLayout && layout) {
return [model.pureLayout, { validating, canCancel, canRetry }, longrunning];
}
return [layout, { validating, canCancel, canRetry }, longrunning];