From 17fb7461866710d54bf01bc05281d13b6f27758a 2015-02-12 13:26:49 From: Cedric GESTES Date: 2015-02-12 13:26:49 Subject: [PATCH] get_body_data: fix for undefined return undefined instead of "undefined" --- diff --git a/IPython/html/static/base/js/utils.js b/IPython/html/static/base/js/utils.js index 32123bf..c4659ab 100644 --- a/IPython/html/static/base/js/utils.js +++ b/IPython/html/static/base/js/utils.js @@ -483,7 +483,10 @@ define([ * we should never have any encoded URLs anywhere else in code * until we are building an actual request */ - return decodeURIComponent($('body').data(key)); + var val = $('body').data(key); + if (!val) + return val; + return decodeURIComponent(val); }; var to_absolute_cursor_pos = function (cm, cursor) {