store.js icon indicating copy to clipboard operation
store.js copied to clipboard

Util function declaration compatible with "use strict"

Open andreasrs opened this issue 7 years ago • 0 comments

Make make_assign in util.js adhere to strict mode.

Newer versions of UglifyJS will fail to process this code, due to their recent commit https://github.com/mishoo/UglifyJS2/pull/2718/files#diff-9f97a9c36fbbfb0d19068d6fae3bb84eR904

Reported like this by Rollup upon uglify: [!] (uglify plugin) Error: Error transforming bundle with 'uglify' plugin: In strict mode code, functions can only be declared at top level or immediately within another function.

Builds successfully when using var which hoists the function like in this PR.

andreasrs avatar Feb 01 '18 08:02 andreasrs