String.trim() polyfill.

This commit is contained in:
George Stephanis 2015-08-10 17:22:03 -04:00
parent 837931f99a
commit 1332ef4a71
1 changed files with 6 additions and 0 deletions

View File

@ -6,6 +6,12 @@
(function($, data, wp){
$(function() {
if ( ! String.prototype.trim ) {
String.prototype.trim = function () {
return this.replace( /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '' );
};
}
var rowTemplate = wp.template( 'wc-tax-table-row' ),
paginationTemplate = wp.template( 'wc-tax-table-pagination' ),
$table = $( '.wc_tax_rates' ),