Handle cases where getChangeLabel.all is undefined

Currently, alertOnSelfApproval throws a "TypeError: Cannot read
property 'some' of undefined" when getChangeLabel doesn't have an
"all" field.

Bug: 1236687
Change-Id: I5326a2a04595dd518aa5a3fd94ccf3d9ff15ffc0
2 files changed
tree: 050326eec0b7bae0107a06c1062ee98b1b49fabf
  1. src/
  2. test/
  3. .eslintrc.json
  4. .gitignore
  5. BUILD
  6. codereview.settings
  7. LICENSE
  8. OWNERS
  9. package-lock.json
  10. package.json
  11. polymer.json
  12. README.md
  13. run-with-prod-data.sh
  14. WATCHLISTS
  15. wct.conf.json
README.md

Chrome/Chromium behavior theme for Gerrit

To run unit tests

$ npm run wct-test

To test with Gerrit FE Dev Helper

Make sure the plugin is installed in plugins/ of Gerrit repository.

$ cd ../.. # Gerrit root directory
$ bazel build plugins/chromium-behavior:chromium-behavior
$ cp -f bazel-bin/plugins/chromium-behavior/chromium-behavior-bundle.js plugins/
$ cd plugins/chromium-behavior
$ run-with-prod-data.sh