From 5a3f0409715bc335645f5ecfc8e515e78aa32bcd Mon Sep 17 00:00:00 2001 From: Mr Snow Date: Tue, 10 Sep 2013 10:50:36 +1000 Subject: [PATCH 1/2] Check for missing group before using. --- js/jquery.multiDialog.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/jquery.multiDialog.js b/js/jquery.multiDialog.js index 0a4ecd5..73ad700 100644 --- a/js/jquery.multiDialog.js +++ b/js/jquery.multiDialog.js @@ -792,6 +792,7 @@ $.extend( MultiDialog.prototype, { }, _getPositionInfo: function( key ) { + if ( ! this.group ) return; if ( this.options.gallery.enabled && this.group.length > 0 && this.options.gallery.showPositionInfo[ key ] && !this.isLoading ) { return "" + this.options.gallery.strings.position.replace( "{index}", this.index + 1 ).replace( "{amount}", this.group.length ) + ""; } From dc971bb3b4edaf82384c8de201899307686fbc93 Mon Sep 17 00:00:00 2001 From: Mr Snow Date: Tue, 10 Sep 2013 10:56:23 +1000 Subject: [PATCH 2/2] Better detect for group. --- js/jquery.multiDialog.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/jquery.multiDialog.js b/js/jquery.multiDialog.js index 73ad700..cd7313a 100644 --- a/js/jquery.multiDialog.js +++ b/js/jquery.multiDialog.js @@ -792,8 +792,7 @@ $.extend( MultiDialog.prototype, { }, _getPositionInfo: function( key ) { - if ( ! this.group ) return; - if ( this.options.gallery.enabled && this.group.length > 0 && this.options.gallery.showPositionInfo[ key ] && !this.isLoading ) { + if ( this.options.gallery.enabled && this.group && this.group.length > 0 && this.options.gallery.showPositionInfo[ key ] && !this.isLoading ) { return "" + this.options.gallery.strings.position.replace( "{index}", this.index + 1 ).replace( "{amount}", this.group.length ) + ""; }