Skip to content

Express State v1.1.3 — Output Bug Fix

Compare
Choose a tag to compare
@ericf ericf released this 06 Mar 23:39
· 33 commits to master since this release

This patch release fixes an issue where an error would be thrown when evaluating the JavaScript output of exposed data with deep namespaces (#23).

The following will no longer throw an error when its output is evaluated in the browser:

app.expose({}, 'foo');
app.expose('baz', 'foo.bar.baz');

Previously, this would output the following and throw because root.foo.bar was undefined:

root.foo || (root.foo = {});
root.foo.bar || (root.foo.bar = {});

root.foo = {};
root.foo.bar.baz = "baz";

Now, the namespaces are initialized next to where data will be assigned to them and now outputs the following:

root.foo = {};
root.foo || (root.foo = {});
root.foo.bar || (root.foo.bar = {});
root.foo.bar.baz = "baz";

Thanks to @jeremyruppel for finding the bug and contributing the fix!


View 1.1.3 Changelog