From 4d3e31817461f420e72c2d4ecbfb2f3b6fd85924 Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Tue, 22 Oct 2019 10:46:16 +0200 Subject: [PATCH] Add check for existing elements --- app/assets/javascripts/repositories/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/repositories/index.js b/app/assets/javascripts/repositories/index.js index b43d038df..638d8cff5 100644 --- a/app/assets/javascripts/repositories/index.js +++ b/app/assets/javascripts/repositories/index.js @@ -128,7 +128,7 @@ .attr('disabled', !this.checked); }); - new PerfectScrollbar(form.find('.teams-list')[0]); + if (form.find('.teams-list').length) new PerfectScrollbar(form.find('.teams-list')[0]); permissionCBs.change(function() { var changes = JSON.parse(permissionChanges.val());