Skip to content

Commit

Permalink
Merge pull request #734 from null-a/sync-after-fresh
Browse files Browse the repository at this point in the history
Sync. params after setting ID from program code.
  • Loading branch information
stuhlmueller committed Dec 19, 2016
2 parents 76aa878 + 27bc226 commit 8c1babc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/params/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,17 @@ function setParams(s, k, a, prms) {
}

function setParamsId(s, k, a, id) {
return k(s, config.setId(id));
config.setId(id);
return params.sync(function() {
return k(s, id);
});
}

function setFreshParamsId(s, k, a) {
return k(s, config.setFreshId());
var id = config.setFreshId();
return params.sync(function() {
return k(s, id);
});
}

function getParamsId(s, k, a, id) {
Expand Down

0 comments on commit 8c1babc

Please sign in to comment.