From: Scott González Date: Wed, 31 Aug 2016 20:29:54 +0000 (-0400) Subject: Controlgroup: Don't use `String.prototype.trim()` X-Git-Tag: 1.12.1~12 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3606e1c33a5838cb6cb55a32de0f11984f84663e;p=jquery-ui.git Controlgroup: Don't use `String.prototype.trim()` We still support IE 8, which doesn't have this method. --- diff --git a/ui/widgets/controlgroup.js b/ui/widgets/controlgroup.js index a4ea251a1..6f357948d 100644 --- a/ui/widgets/controlgroup.js +++ b/ui/widgets/controlgroup.js @@ -234,7 +234,7 @@ return $.widget( "ui.controlgroup", { var result = {}; $.each( classes, function( key ) { var current = instance.options.classes[ key ] || ""; - current = current.replace( controlgroupCornerRegex, "" ).trim(); + current = $.trim( current.replace( controlgroupCornerRegex, "" ) ); result[ key ] = ( current + " " + classes[ key ] ).replace( /\s+/g, " " ); } ); return result;