Skip to content

Commit d9710ff

Browse files
committed
fix for precommit
1 parent 0eb6674 commit d9710ff

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

reflex/.templates/web/utils/state.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ export const applyEvent = async (event, socket, navigate, params) => {
271271
a.href = eval?.(
272272
event.payload.url.replace(
273273
"getBackendURL(env.UPLOAD)",
274-
`"${getBackendURL(env.UPLOAD)}"`
275-
)
274+
`"${getBackendURL(env.UPLOAD)}"`,
275+
),
276276
);
277277
}
278278
a.download = event.payload.filename;
@@ -428,7 +428,7 @@ export const applyRestEvent = async (event, socket, navigate, params) => {
428428
event.payload.files,
429429
event.payload.upload_id,
430430
event.payload.on_upload_progress,
431-
socket
431+
socket,
432432
);
433433
return false;
434434
}
@@ -626,7 +626,7 @@ export const uploadFiles = async (
626626
files,
627627
upload_id,
628628
on_upload_progress,
629-
socket
629+
socket,
630630
) => {
631631
// return if there's no file to upload
632632
if (files === undefined || files.length === 0) {
@@ -779,7 +779,7 @@ export const Event = (
779779
name,
780780
payload = {},
781781
event_actions = {},
782-
handler = null
782+
handler = null,
783783
) => {
784784
return { name, payload, handler, event_actions };
785785
};
@@ -806,7 +806,7 @@ export const hydrateClientStorage = (client_storage) => {
806806
for (const state_key in client_storage.local_storage) {
807807
const options = client_storage.local_storage[state_key];
808808
const local_storage_value = localStorage.getItem(
809-
options.name || state_key
809+
options.name || state_key,
810810
);
811811
if (local_storage_value !== null) {
812812
client_storage_values[state_key] = local_storage_value;
@@ -817,7 +817,7 @@ export const hydrateClientStorage = (client_storage) => {
817817
for (const state_key in client_storage.session_storage) {
818818
const session_options = client_storage.session_storage[state_key];
819819
const session_storage_value = sessionStorage.getItem(
820-
session_options.name || state_key
820+
session_options.name || state_key,
821821
);
822822
if (session_storage_value != null) {
823823
client_storage_values[state_key] = session_storage_value;
@@ -842,7 +842,7 @@ export const hydrateClientStorage = (client_storage) => {
842842
const applyClientStorageDelta = (client_storage, delta) => {
843843
// find the main state and check for is_hydrated
844844
const unqualified_states = Object.keys(delta).filter(
845-
(key) => key.split(".").length === 1
845+
(key) => key.split(".").length === 1,
846846
);
847847
if (unqualified_states.length === 1) {
848848
const main_state = delta[unqualified_states[0]];
@@ -879,7 +879,7 @@ const applyClientStorageDelta = (client_storage, delta) => {
879879
const session_options = client_storage.session_storage[state_key];
880880
sessionStorage.setItem(
881881
session_options.name || state_key,
882-
delta[substate][key]
882+
delta[substate][key],
883883
);
884884
}
885885
}
@@ -899,7 +899,7 @@ const applyClientStorageDelta = (client_storage, delta) => {
899899
export const useEventLoop = (
900900
dispatch,
901901
initial_events = () => [],
902-
client_storage = {}
902+
client_storage = {},
903903
) => {
904904
const socket = useRef(null);
905905
const location = useLocation();
@@ -929,7 +929,7 @@ export const useEventLoop = (
929929

930930
event_actions = _events.reduce(
931931
(acc, e) => ({ ...acc, ...e.event_actions }),
932-
event_actions ?? {}
932+
event_actions ?? {},
933933
);
934934

935935
const _e = args.filter((o) => o?.preventDefault !== undefined)[0];
@@ -1084,7 +1084,7 @@ export const useEventLoop = (
10841084
vars[storage_to_state_map[e.key]] = e.newValue;
10851085
const event = Event(
10861086
`${state_name}.reflex___state____update_vars_internal_state.update_vars_internal`,
1087-
{ vars: vars }
1087+
{ vars: vars },
10881088
);
10891089
addEvents([event], e);
10901090
}
@@ -1198,7 +1198,7 @@ export const getRefValues = (refs) => {
11981198
return refs.map((ref) =>
11991199
ref.current
12001200
? ref.current.value || ref.current.getAttribute("aria-valuenow")
1201-
: null
1201+
: null,
12021202
);
12031203
};
12041204

0 commit comments

Comments
 (0)