From 2fcadc2f44f13bd43ef5fc9a39ae2daf4724e254 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 9 Jun 2014 08:52:35 +0800 Subject: [PATCH] Avoid "self" referring to "window"; adjust comment placement --- src/validator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/validator.js b/src/validator.js index 9ef0b55ed..b012127fd 100644 --- a/src/validator.js +++ b/src/validator.js @@ -4,14 +4,14 @@ JSONEditor.Validator = Class.extend({ this.options = options || {}; this.refs = this.options.refs || {}; - // Store any $ref and definitions this.ready_callbacks = []; if(this.options.ready) this.ready(this.options.ready); + // Store any $ref and definitions this.getRefs(); }, ready: function(callback) { - if(this.is_ready) callback.apply(self,[this.expanded]); + if(this.is_ready) callback.apply(this,[this.expanded]); else { this.ready_callbacks.push(callback); }