Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
vankeisb committed Sep 1, 2020
1 parent bed3e09 commit ea5d4c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tea-cup/src/TeaCup/Program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ interface ProgramState<Model> {
class Guid {
static newGuid() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = (Math.random() * 16) | 0,
const r = (Math.random() * 16) | 0,
v = c == 'x' ? r : (r & 0x3) | 0x8;
return v.toString(16);
});
Expand Down Expand Up @@ -155,7 +155,7 @@ export class Program<Model, Msg> extends Component<ProgramProps<Model, Msg>, Pro
}

setModel(model: Model, withSubs: boolean) {
this.setState((state, props) => {
this.setState(state => {
let newSub: Sub<Msg>;
if (withSubs) {
newSub = this.props.subscriptions(model);
Expand Down

0 comments on commit ea5d4c9

Please sign in to comment.