From c95ea732a842be9de0abcf7fbcb448fcbb152ff9 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Wed, 21 Aug 2013 10:13:44 +0100 Subject: [PATCH] Fixed #776 - the output wasn't getting rendered once the procesor was ready. In addition, it was returning too early, and the `ready` function wasn't called, which meant the processor selection wasn't made. --- public/js/processors/processor.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/public/js/processors/processor.js b/public/js/processors/processor.js index 61b9e4d2..2247478b 100644 --- a/public/js/processors/processor.js +++ b/public/js/processors/processor.js @@ -1,4 +1,11 @@ var processors = jsbin.processors = (function () { + /* + * Debugging note: to emulate a slow connection, or a processor taking too + * long to load, find the processor in question, and change the `init` method + * to setTimeout(getScript, n seconds) - this will give you an idea of how + * jsbin behaves when the processor isn't ready and the user makes calls to it + */ + /** * Add properties to a function using underscore @@ -63,7 +70,7 @@ var processors = jsbin.processors = (function () { init(function () { callback = handler; if (failed) { - return editors.console.render(); + renderLivePreview(); } ready(); });