Skip to content

Commit

Permalink
make arguments parameter optional
Browse files Browse the repository at this point in the history
  • Loading branch information
rudlinkon committed Aug 25, 2024
1 parent beeafdb commit f0cb3e0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function Elements() {
},
clickHandler = () => {
eaDispatch({type: 'BUTTON_LOADER', payload: 'elements'});
asyncDispatch({eaState, eaDispatch}, 'SAVE_ELEMENTS_DATA', {});
asyncDispatch({eaState, eaDispatch}, 'SAVE_ELEMENTS_DATA');
},
scrollHandler = () => {
const newScrollY = window.pageYOffset - 32 - eaState.scrollOffset,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function Extensions() {
},
clickHandler = () => {
eaDispatch({type: 'BUTTON_LOADER', payload: 'extensions'});
asyncDispatch({eaState, eaDispatch}, 'SAVE_ELEMENTS_DATA', {});
asyncDispatch({eaState, eaDispatch}, 'SAVE_ELEMENTS_DATA');
};

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const debouncer = (callback, delay) => {
localStorage.setItem('eael_dashboard', JSON.stringify(data));
};

export function asyncDispatch({eaState, eaDispatch}, $type, $args) {
export function asyncDispatch({eaState, eaDispatch}, $type, $args = {}) {
const eaData = localize.eael_dashboard;
let $payload, params;

Expand Down

0 comments on commit f0cb3e0

Please sign in to comment.