Revision 99854ef0fa41263dc05c8263b00183aec8e139a0 authored by James Graham on 04 April 2018, 18:13:44 UTC, committed by moz-wptsync-bot on 04 April 2018, 18:13:44 UTC
Ensure that check_paths is always called in set_from_config, and allow the manifest_path to
be empty before we set the default.
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1447609
gecko-commit: e1cf99d8213dc7455959b75f1ab0116e69c5f095
gecko-integration-branch: central
gecko-reviewers: maja_zf
1 parent 7c51ebb
Raw File
arrays.js
// Returns true if the given arrays are equal. Optionally can pass an equality function.
export function areArraysEqual(a, b, equalityFunction = (c, d) => { return c === d; }) {
  try {
    if (a.length !== b.length)
      return false;

    for (let i = 0; i < a.length; i++) {
      if (!equalityFunction(a[i], b[i]))
        return false;
    }
  } catch (ex) {
    return false;
  }

  return true;
}
back to top