Check if either array is null before diffing

Reviewed By: sebmarkbage

Differential Revision: D3219392

fb-gh-sync-id: fd6ef2e2c2d7b661a06c857b25b007701340e20a
fbshipit-source-id: fd6ef2e2c2d7b661a06c857b25b007701340e20a
This commit is contained in:
Scott Foggo 2016-04-25 13:27:53 -07:00 committed by Facebook Github Bot 4
parent 860b7ddc35
commit 50d6de9448
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ var merge = require('merge');
// Diff Helpers
function arrayDiffer(a, b) {
if (a == null) {
if (a == null || b == null) {
return true;
}
if (a.length !== b.length) {