Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage of this in DOMPropertyOperations module breaks build in Closure Compiler under advanced optimizations #8887

Closed
roman01la opened this issue Jan 30, 2017 · 1 comment · Fixed by #8892

Comments

@roman01la
Copy link
Contributor

roman01la commented Jan 30, 2017

Do you want to request a feature or report a bug?
Report a bug

What is the current behavior?
Referring to object's method from a another method within same object, this.deleteValueForProperty(node, name);, here, breaks React build in Closure Compiler under advanced optimizations.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: https://jsfiddle.net/reactjs/69z2wepo/).
Build a React app using Closure Compiler in advanced mode. (Unfortunately I can not provide a source of the app where I got this bug.)

What is the expected behavior?
An app built with Closure Compiler in advanced mode should not throw this.deleteValueForProperty is not a function exception

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
React v15.4.2

Changing this.deleteValueForProperty to DOMPropertyOperations.deleteValueForProperty solves this issue. There are other methods of DOMPropertyOperations object which are using deleteValueForProperty properly via DOMPropertyOperations.deleteValueForProperty call.

If this makes sense, I'll prepare a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants