TypeError: Cannot assign to read only property 'data' of object '#<ImageData>' #15904
Description
I'm submitting a ... (check one with "x")
[ X ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
In Chrome 57 (not 56 or prior) on Windows or Mac, using Angular 1.5.7 and ui.router module, when calling $state.go and passing state variable object containing instance of ImageData, at some point copyRecurse
tries to do a member-wise copy of the ImageData instance, even though it's immutable and should be copied by reference only.
Expected behavior
copyRecurse
should detect that the ImageData
instance is immutable and not do a member-wise copy on it.
Minimal reproduction of the problem with instructions
Steps:
- Go to https://www.sherwin-williams.com/visualizer#/active/colors
- Select "Match a photo"
- Select an image file in the file system dialog
- Check "I accept Terms of Use"
- Select "Done"
See the error message in the console.
What is the motivation / use case for changing the behavior?
Whatever reason for recursively copying state variables, stop recursion when you hit an ImageData instance.
Please tell us about your environment:
Windows or Mac. This is happening only on Chrome 57, not any previous versions. We've tested and used this feature for years.
- Angular version: 1.5.7
- Browser: [Chrome 57]
-
Language: [ES5]
-
Node (for AoT issues):
node --version
=