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

Fails in strict mode #86

Open
axelson opened this issue Jul 9, 2015 · 0 comments
Open

Fails in strict mode #86

axelson opened this issue Jul 9, 2015 · 0 comments

Comments

@axelson
Copy link

axelson commented Jul 9, 2015

Since _getDataToSend is defined as an implicit global variable (along with a few other functions), this library will fail to load when run in Javascript strict mode (i.e. "use strict";) with the error: ReferenceError: _getDataToSend is not defined.

I believe that angular-payments should be changed to define those functions as local variables so that it doesn't cause issues in strict mode and leak variables into the global scope. Looking at the functions they don't appear to be meant to be loaded into the global scope.

techguy613 pushed a commit to techguy613/angular-payments that referenced this issue Sep 2, 2015
…out issue (make sure used variables and functions are defined with var)

- This addresses open issue laurihy#86 (laurihy#86). Code now works with "use strict".
- Added missing semi-colons in function definitions
- Incremented version in bower.json
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant