Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Runtime failures during 'strict mode' #52

@psybuzz

Description

@psybuzz

Running weblas in a browser's 'strict mode' will throw runtime errors.

Repro: see https://jsfiddle.net/u7by8azp/, created by pasting dist/weblas.js into a script with 'use strict' at the top.
Expected: no console errors in devtools
Actual:

Uncaught ReferenceError: p is not defined
    at new DownsampleCalculator

This makes it challenging to use weblas as an external dependency when building a project that bundles or concatenates it with other scripts that have strict mode enabled.

It seems that if we patch a couple instances in weblas code, adding var before variable declarations, this should work:
https://jsfiddle.net/cft3aqvu/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions