From fe5b56a9c2a0dd623f751cde4ea6f6b89099988a Mon Sep 17 00:00:00 2001 From: wenzhixin <wenzhixin2010@gmail.com> Date: Sun, 8 May 2016 14:49:27 +0800 Subject: [PATCH] fix #897: success is not defined bug --- .../js/bootstrap-editable.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dist/bootstrap3-editable/js/bootstrap-editable.js b/dist/bootstrap3-editable/js/bootstrap-editable.js index 77edddb..562cabc 100644 --- a/dist/bootstrap3-editable/js/bootstrap-editable.js +++ b/dist/bootstrap3-editable/js/bootstrap-editable.js @@ -2574,16 +2574,16 @@ List - abstract class for inputs that have source option loaded from js array or }, value2html: function (value, element, display, response) { - var deferred = $.Deferred(); - success = deferred.then(function () { - if(typeof display === 'function') { - //custom display method - display.call(element, value, this.sourceData, response); - } else { - this.value2htmlFinal(value, element); - } - deferred.resolve(); - }); + var deferred = $.Deferred(), + success = function () { + if(typeof display === 'function') { + //custom display method + display.call(element, value, this.sourceData, response); + } else { + this.value2htmlFinal(value, element); + } + deferred.resolve(); + }; //for null value just call success without loading source if(value === null) {