Type canDefineProperty (#7500)

(cherry picked from commit 18003578b1)
This commit is contained in:
Christopher Chedeau
2016-10-03 16:27:31 -07:00
committed by Paul O’Shannessy
parent cb963b09ab
commit 52235eadfd
+2
View File
@@ -6,6 +6,7 @@
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @flow
* @providesModule canDefineProperty
*/
@@ -14,6 +15,7 @@
var canDefineProperty = false;
if (__DEV__) {
try {
// $FlowFixMe https://github.com/facebook/flow/issues/285
Object.defineProperty({}, 'x', {get: function() {}});
canDefineProperty = true;
} catch (x) {