Skip to content

Commit

Permalink
Character counter: Conditional for passing wp.utils.WordCounter(), fo…
Browse files Browse the repository at this point in the history
…r views where counter script isn't needed
  • Loading branch information
gyrus committed Jun 4, 2019
1 parent fa01aaf commit ad53cc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/cmb2-char-counter.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,4 +265,4 @@ window.CMB2.charcounter = window.CMB2.charcounter || {};
.on( 'cmb2_remove_row', charcounter.removeRow );


} )( window, document, jQuery, window.CMB2, window.CMB2.charcounter, new wp.utils.WordCounter() );
} )( window, document, jQuery, window.CMB2, window.CMB2.charcounter, ( wp.utils ? new wp.utils.WordCounter() : {} ) );

0 comments on commit ad53cc4

Please sign in to comment.