From a85126ea9785dc0bbb8d950d2662ebafca0f6aca Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Mon, 31 Oct 2016 12:17:50 -0400 Subject: [PATCH] Prevent NPE in delete namespace Fixes #2039 --- static/js/services/user-service.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/static/js/services/user-service.js b/static/js/services/user-service.js index 6a7d82c26..b60f97806 100644 --- a/static/js/services/user-service.js +++ b/static/js/services/user-service.js @@ -171,6 +171,10 @@ function(ApiService, CookieService, $rootScope, Config, $location) { userService.deleteNamespace = function(info, callback) { var namespace = info.user ? info.user.username : info.organization.name; + if (!namespace) { + return; + } + var deleteNamespaceItself = function() { info.progress = 1; info.progressMessage = 'Deleting namespace...';