]> source.dussan.org Git - jquery-ui.git/commitdiff
Controlgroup: Don't use `String.prototype.trim()`
authorScott González <scott.gonzalez@gmail.com>
Wed, 31 Aug 2016 20:29:54 +0000 (16:29 -0400)
committerScott González <scott.gonzalez@gmail.com>
Wed, 31 Aug 2016 20:29:56 +0000 (16:29 -0400)
We still support IE 8, which doesn't have this method.

ui/widgets/controlgroup.js

index a4ea251a15e8886b68f28100f92390c2ed132470..6f357948d94cc2ff8894bea272a2a9d258d68b37 100644 (file)
@@ -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;