Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: allow client to run in strict mode #51

Open
wants to merge 1 commit into
base: v7
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions client-library.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@
// *****************
// Re-rendering react components
var re_render_scheduled = false
re_rendering = false
var re_rendering = false
function schedule_re_render() {
if (!re_render_scheduled) {
requestAnimationFrame(function () {
Expand Down Expand Up @@ -617,7 +617,8 @@
if (this.state.value) new_props.value = this.state.value
new_props.onChange = this.onChange
return element(new_props)
}

}
}))
}

Expand Down Expand Up @@ -667,12 +668,12 @@

// We'll define functions for all HTML tags...
var function_for_tag = (tag) =>
(...arguments) => {
(...args) => {
var children = []
var attrs = {style: {}}

for (var i=0; i<arguments.length; i++) {
var arg = arguments[i]
for (var i=0; i<args.length; i++) {
var arg = args[i]

if (arg === undefined)
continue
Expand Down
7 changes: 5 additions & 2 deletions statebus.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
(function(name, definition) {
if (typeof module != 'undefined') module.exports = definition()
else if (typeof define == 'function' && typeof define.amd == 'object') define(definition)
else this[name] = definition()
}('statebus', function() {statelog_indent = 0; var busses = {}, bus_count = 0, executing_funk, global_funk, funks = {}, clean_timer, symbols, nodejs = typeof window === 'undefined'; function make_bus (options) {
else if(this) this[name] = definition()
else if(window) window[name] = definition()

}('statebus', function() {var statelog_indent = 0; var busses = {}, bus_count = 0, executing_funk, global_funk, funks = {}, clean_timer, symbols, nodejs = typeof window === 'undefined'; function make_bus (options) {


// ****************
Expand Down Expand Up @@ -731,6 +733,7 @@
}
}

let handler
// Now iterate through prefixes
for (var i=0; i < wildcard_handlers.length; i++) {
handler = wildcard_handlers[i]
Expand Down