From 754e041cbdb3e32ce708626050bdd5b82f328d35 Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Wed, 30 Sep 2015 15:48:30 +0200 Subject: Controlgroup: Optimize and simplify data access and storage --- ui/widgets/controlgroup.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'ui/widgets/controlgroup.js') diff --git a/ui/widgets/controlgroup.js b/ui/widgets/controlgroup.js index c07202795..77559e50a 100644 --- a/ui/widgets/controlgroup.js +++ b/ui/widgets/controlgroup.js @@ -88,10 +88,8 @@ return $.widget( "ui.controlgroup", { // Store an instance of the controlgroup to be able to reference it later var widgetElement = element[ widget ]( "widget" ); - widgetElement.data( - "ui-controlgroup-data", - element.data( "ui-" + widget.charAt( 0 ).toUpperCase() + widget.slice( 1 ) ) - ); + $.data( widgetElement[ 0 ], "ui-controlgroup-data", + element[ widget ]( "instance" ) ); childWidgets.push( widgetElement[ 0 ] ); } ); -- cgit v1.2.3