Skip to content

Commit e589f9c

Browse files
committed
ISSUE #5299 - fix crash due to hook order when refreshing in tabular view
1 parent dbae321 commit e589f9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frontend/src/v5/ui/routes/viewer/tickets/ticketsForm/properties/coordsProperty/coordsProperty.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const CoordsProperty = ({ value, label, onChange, onBlur, required, error
4343
const prevValue = useRef(undefined);
4444
const { getValues } = useFormContext();
4545
const ticket = getValues() as ITicket;
46-
const selectedTemplateId = ticket?.type ?? TicketsCardHooksSelectors.selectSelectedTemplateId();
46+
const selectedTemplateId = TicketsCardHooksSelectors.selectSelectedTemplateId() ?? ticket?.type;
4747
const template = TicketsHooksSelectors.selectTemplateById(containerOrFederation, selectedTemplateId);
4848
const selectedPin = TicketsCardHooksSelectors.selectSelectedTicketPinId();
4949

0 commit comments

Comments
 (0)