Skip to content

Commit

Permalink
resolving type issue
Browse files Browse the repository at this point in the history
  • Loading branch information
npfitz authored and rafpaf committed Apr 30, 2024
1 parent 3e01836 commit 402be8c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion frontend/src/metabase/lib/redux/typed-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ export function createThunkAction<TArgs extends any[]>(
thunkCreator: (
...args: TArgs
) => (dispatch: Dispatch, getState: GetState) => any,
): (...args: TArgs) => any {
) {
return withAction(actionType)(thunkCreator);
}
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,14 @@ export const QuestionActions = ({
const handleFileUpload = (event: ChangeEvent<HTMLInputElement>) => {
const file = event.target.files?.[0];
if (file && question._card.based_on_upload) {
uploadFile({
file,
tableId: question._card.based_on_upload,
reloadQuestionData: true,
uploadMode,
})(dispatch);

dispatch(
uploadFile({
file,
tableId: question._card.based_on_upload,
reloadQuestionData: true,
uploadMode,
}),
);
// reset the file input so that subsequent uploads of the same file trigger the change handler
if (fileInputRef.current?.value) {
fileInputRef.current.value = "";
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/metabase/redux/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const settings = createReducer(
builder.addCase(refreshSiteSettings.rejected, state => {
state.loading = false;
});
builder.addCase(UPDATE_USER_SETTING, (state, { payload }) => {
builder.addCase(updateUserSetting.toString(), (state, { payload }) => {
state.values[payload.key] = payload.value;
});
},
Expand Down

0 comments on commit 402be8c

Please sign in to comment.