From d0b0a64af3ad9b46f0c03769d7406bda14c720f2 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Fri, 7 Feb 2020 21:23:59 -0800 Subject: [PATCH] js: Convert _.isEmpty(a) to a.length !== 0. Signed-off-by: Anders Kaseorg --- frontend_tests/zjsunit/index.js | 2 +- static/js/settings_org.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend_tests/zjsunit/index.js b/frontend_tests/zjsunit/index.js index 9535b30bcd..b7bb6d1807 100644 --- a/frontend_tests/zjsunit/index.js +++ b/frontend_tests/zjsunit/index.js @@ -25,7 +25,7 @@ function immediate(f) { // Find the files we need to run. const finder = require('./finder.js'); const files = finder.find_files_to_run(); // may write to console -if (_.isEmpty(files)) { +if (files.length === 0) { throw "No tests found"; } diff --git a/static/js/settings_org.js b/static/js/settings_org.js index 6599724ff5..8943e59f83 100644 --- a/static/js/settings_org.js +++ b/static/js/settings_org.js @@ -963,7 +963,7 @@ exports.build_page = function () { const node = $("#allowed_domains_label").parent(); if (org_join_restrictions === 'only_selected_domain') { node.show(); - if (_.isEmpty(page_params.realm_domains)) { + if (page_params.realm_domains.length === 0) { overlays.open_modal('realm_domains_modal'); } } else {