Skip to content
This repository has been archived by the owner on Sep 3, 2022. It is now read-only.

Commit

Permalink
Minor update for readibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wobbabits committed Nov 4, 2018
1 parent 8cdf1d7 commit 89c2e3b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dist/composi-core.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@composi/core",
"version": "0.9.2",
"version": "0.9.3",
"description": "A JavaScript library for creating websites, PWAs and hybrid apps.",
"main": "src/index.js",
"scripts": {
Expand Down
10 changes: 5 additions & 5 deletions src/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function run(program) {
*/
function send(message) {
if (isRunning) {
change(update(message, state))
updateView(update(message, state))
}
}

Expand All @@ -33,7 +33,7 @@ export function run(program) {
* @param {any[]} update
* @return {void} undefined
*/
function change(update) {
function updateView(update) {
let init = program.init()
if (update) {
;[state, effect] = update
Expand All @@ -48,19 +48,19 @@ export function run(program) {
view(state, send)
}

change(state)
updateView(state)

/**
* Function to end runtime.
* @return {void} undefined
*/
function end() {
function endProgram() {
if (isRunning) {
isRunning = false
if (done) {
done(state)
}
}
}
return end
return endProgram
}

0 comments on commit 89c2e3b

Please sign in to comment.