Fix breakages caused by switch to fbjs

Summary: This fixes a couple of breakages introduced by the switch to fbjs

Reviewed By: bestander

Differential Revision: D3000078

fb-gh-sync-id: 2971d049030f754d5001f6729716373a64078ddf
shipit-source-id: 2971d049030f754d5001f6729716373a64078ddf
This commit is contained in:
David Aurelio 2016-03-02 08:26:11 -08:00 committed by Facebook Github Bot 5
parent e7499e39a4
commit c331d113dc
5 changed files with 38 additions and 3 deletions

View File

@ -34,7 +34,7 @@ var ScrollResponder = require('ScrollResponder');
var StaticRenderer = require('StaticRenderer');
var TimerMixin = require('react-timer-mixin');
var isEmpty = require('fbjs/lib/isEmpty');
var isEmpty = require('isEmpty');
var merge = require('merge');
var PropTypes = React.PropTypes;

View File

@ -29,7 +29,7 @@
'use strict';
var invariant = require('fbjs/lib/invariant');
var isEmpty = require('fbjs/lib/isEmpty');
var isEmpty = require('isEmpty');
var warning = require('fbjs/lib/warning');
function defaultGetRowData(

View File

@ -36,7 +36,7 @@ const React = require('React');
const ReactComponentWithPureRenderMixin = require('ReactComponentWithPureRenderMixin');
const StyleSheet = require('StyleSheet');
const emptyFunction = require('emptyFunction');
const emptyFunction = require('fbjs/lib/emptyFunction');
const {PropTypes} = React;
const {Directions} = NavigationLinearPanResponder;

34
Libraries/vendor/core/isEmpty.js vendored Normal file
View File

@ -0,0 +1,34 @@
/**
* @generated SignedSource<<97ffcebc9ae390e734026a4f3964bff6>>
*
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* !! This file is a check-in of a static_upstream project! !!
* !! !!
* !! You should not modify this file directly. Instead: !!
* !! 1) Use `fjs use-upstream` to temporarily replace this with !!
* !! the latest version from upstream. !!
* !! 2) Make your changes, test them, etc. !!
* !! 3) Use `fjs push-upstream` to copy your changes back to !!
* !! static_upstream. !!
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
*
* @providesModule isEmpty
*/
/**
* Mimics empty from PHP.
*/
function isEmpty(obj) {
if (Array.isArray(obj)) {
return obj.length === 0;
} else if (typeof obj === 'object') {
for (var i in obj) {
return false;
}
return true;
} else {
return !obj;
}
}
module.exports = isEmpty;

View File

@ -19,6 +19,7 @@ var sharedBlacklist = [
// fbjs forks:
'node_modules/fbjs/lib/Map.js',
'node_modules/fbjs/lib/isEmpty.js',
/website\/node_modules\/.*/,