Repository: incubator-zeppelin Updated Branches: refs/heads/master fb4a76a20 -> 1e34c8ab8
ZEPPELIN-859 Error on notebook page due to null property ### What is this PR for? Add null check to prevent js error on notebook page ### What type of PR is it? Bug Fix ### Todos * [ ] - Task ### What is the Jira issue? ZEPPELIN-859 ### How should this be tested? click on any note name from home page ### Screenshots (if appropriate) <img width="1680" alt="screen shot 2016-05-18 at 12 23 32 pm" src="https://cloud.githubusercontent.com/assets/2031306/15350362/9359b936-1cf6-11e6-9b62-9a7458406c75.png"> ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no Author: Renjith Kamath <renjith.kam...@gmail.com> Closes #896 from r-kamath/noteNameError and squashes the following commits: e34e42f [Renjith Kamath] ZEPPELIN-859 Error on notebook page due null property Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/1e34c8ab Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/1e34c8ab Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/1e34c8ab Branch: refs/heads/master Commit: 1e34c8ab8024f92bde8e853bc12731ed87016ef7 Parents: fb4a76a Author: Renjith Kamath <renjith.kam...@gmail.com> Authored: Wed May 18 12:44:15 2016 +0530 Committer: Prabhjyot Singh <prabhjyotsi...@gmail.com> Committed: Fri May 20 12:21:15 2016 +0530 ---------------------------------------------------------------------- zeppelin-web/src/app/home/home.controller.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/1e34c8ab/zeppelin-web/src/app/home/home.controller.js ---------------------------------------------------------------------- diff --git a/zeppelin-web/src/app/home/home.controller.js b/zeppelin-web/src/app/home/home.controller.js index a87ac91..dee1685 100644 --- a/zeppelin-web/src/app/home/home.controller.js +++ b/zeppelin-web/src/app/home/home.controller.js @@ -37,7 +37,7 @@ angular.module('zeppelinWebApp').controller('HomeCtrl', function($scope, noteboo console.log('Error %o %o', status, data.message); }); }; - + var initHome = function() { websocketMsgSrv.getHomeNotebook(); getZeppelinVersion(); @@ -77,7 +77,9 @@ angular.module('zeppelinWebApp').controller('HomeCtrl', function($scope, noteboo }; $rootScope.noteName = function(note) { - return arrayOrderingSrv.getNoteName(note); + if (!_.isEmpty(note)) { + return arrayOrderingSrv.getNoteName(note); + } }; });