From 1df1e80302ad4136e27a92344265101de5fc2c87 Mon Sep 17 00:00:00 2001 From: Nicolas Riesco Date: Sat, 18 Jun 2016 17:51:15 +0100 Subject: [PATCH] handlers: do not send empty results on IOPub --- lib/handlers_v4.js | 4 ++++ lib/handlers_v5.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/handlers_v4.js b/lib/handlers_v4.js index fde452e..c9d1294 100755 --- a/lib/handlers_v4.js +++ b/lib/handlers_v4.js @@ -165,6 +165,10 @@ function execute_request(request) { } ); + if (!result.mime) { + return; + } + if (this.hideUndefined && result.mime["text/plain"] === "undefined") { return; diff --git a/lib/handlers_v5.js b/lib/handlers_v5.js index a76661d..49dc486 100755 --- a/lib/handlers_v5.js +++ b/lib/handlers_v5.js @@ -185,6 +185,10 @@ function execute_request(request) { } ); + if (!result.mime) { + return; + } + if (this.hideUndefined && result.mime["text/plain"] === "undefined") { return;