From 44a858a49a4779b42c1f27de6074f5b80e22426e Mon Sep 17 00:00:00 2001 From: Nikolai Onken Date: Sun, 15 Feb 2015 17:03:03 +0000 Subject: [PATCH] Throw if ready is set more than once --- plugins/c9.ide.editors/document.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/c9.ide.editors/document.js b/plugins/c9.ide.editors/document.js index 1f8a9878..5326b831 100644 --- a/plugins/c9.ide.editors/document.js +++ b/plugins/c9.ide.editors/document.js @@ -338,8 +338,9 @@ define(function(require, module, exports) { */ get ready(){ return ready; }, set ready(v) { - if (!ready) emit.sticky("ready"); + if (ready) throw new Error("Permission Denied"); ready = true; + emit.sticky("ready"); }, /** * The tooltip displayed when hovering over the tab button