Commit Graph

5 Commits

Author SHA1 Message Date
Dan Abramov
d3bbfe09cc Fix IE version in comment 2018-09-12 15:10:28 +01:00
Aliaksandr Manzhula
1b2646a403 Fix warning without stack for ie9 (#13620)
* Fix warning without stack for ie9

Where console methods like log, error etc. don't have 'apply' method.
Because of the lot of tests already expect that exactly console['method']
will be called - had to reapply references for console.error method

https://github.com/facebook/react/issues/13610

* pass parameters explicitly to avoid using .apply
which is not supported for console methods in ie9

* Minor tweaks
2018-09-12 15:09:57 +01:00
Héctor Ramos
b87aabdfe1
Drop the year from Facebook copyright headers and the LICENSE file. (#13593) 2018-09-07 15:11:23 -07:00
Nathan Hunzaker
5550ed4a8f
Ensure arguments are coerced to strings in warnings (#13385)
* Manually join extra attributes in warning

This prevents a bug where Chrome reports `Array(n)` where `n` is the
size of the array.

* Prettier

* Stringify all %s replaced symbols in warning

* Eliminate extra string coercion

* Pass args through with spread, convert all arguments to strings

* Rename strings to stringArgs
2018-08-13 16:13:51 -07:00
Dan Abramov
f9358c51c8
Change warning() to automatically inject the stack, and add warningWithoutStack() as opt-out (#13161)
* Use %s in the console calls

* Add shared/warningWithStack

* Convert some warning callsites to warningWithStack

* Use warningInStack in shared utilities and remove unnecessary checks

* Replace more warning() calls with warningWithStack()

* Fixes after rebase + use warningWithStack in react

* Make warning have stack by default; warningWithoutStack opts out

* Forbid builds that may not use internals

* Revert newly added stacks

I changed my mind and want to keep this PR without functional changes. So we won't "fix" any warnings that are already missing stacks. We'll do it in follow-ups instead.

* Fix silly find/replace mistake

* Reorder imports

* Add protection against warning argument count mismatches

* Address review
2018-07-16 22:31:59 +01:00