Skip to content

Commit

Permalink
forgot a throttle
Browse files Browse the repository at this point in the history
  • Loading branch information
FranzPoize committed Sep 15, 2017
1 parent a7935dd commit 843a1a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/scripts/actions/font.actions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const debouncedSave = _.throttle((values, db, variantId) => {
values,
variantId,
});
}, 300);
}, 1000);

window.addEventListener('fluxServer.setup', () => {
localClient = LocalClient.instance();
Expand Down Expand Up @@ -434,10 +434,10 @@ export default {
localServer.dispatchUpdate('/undoableStore', patch);
localClient.dispatchAction('/update-font', newParams);

debouncedSave(newParams, db, variantId);
if (force) {
//TODO(franz): This SHOULD totally end up being in a flux store on hoodie
undoWatcher.forceUpdate(patch, label);
debouncedSave(newParams, db, variantId);
}
else {
undoWatcher.update(patch, label);
Expand Down

0 comments on commit 843a1a9

Please sign in to comment.