@@ -183,7 +183,7 @@ QUnit.module("igHTMLEditor unit tests", {
183183 buttonCombinationsTest : function ( ) {
184184 var i , buttonsNames = arguments ;
185185 for ( i = 0 ; i < buttonsNames . length ; i ++ ) {
186- if ( typeof this [ buttonsNames [ i ] ] === "function" ) {
186+ if ( $ . ig . util . getType ( this [ buttonsNames [ i ] ] ) === "function" ) {
187187 this [ buttonsNames [ i ] ] ( ) ;
188188 }
189189 }
@@ -355,7 +355,7 @@ QUnit.module("igHTMLEditor unit tests", {
355355 self . htmlEditor . igHtmlEditor ( 'executeAction' , actionName , param ) ;
356356
357357 var condition = false ;
358- if ( typeof conditionCallBack === "function" ) {
358+ if ( $ . ig . util . getType ( conditionCallBack ) === "function" ) {
359359 condition = conditionCallBack . call ( p , self . editorBody ) ;
360360 }
361361 self . assert . ok ( condition , 'Execute action ' + actionName + " combo." ) ;
@@ -383,7 +383,7 @@ QUnit.module("igHTMLEditor unit tests", {
383383 self . htmlEditor . data ( "igHtmlEditor" ) . _selectionWrapperSaved . select ( p . contents ( ) ) ;
384384 button . trigger ( "click" ) ;
385385 var condition = false ;
386- if ( typeof conditionCallBack === "function" ) {
386+ if ( $ . ig . util . getType ( conditionCallBack ) === "function" ) {
387387 condition = conditionCallBack . call ( p , self . editorBody ) ;
388388 }
389389 self . assert . ok ( condition , buttonName + " combo." ) ;
@@ -415,7 +415,7 @@ QUnit.module("igHTMLEditor unit tests", {
415415 return $ . ig . TestUtil . wait ( 200 ) ;
416416 } ) . then ( function ( ) {
417417 var condition = false ;
418- if ( typeof conditionCallBack === "function" ) {
418+ if ( $ . ig . util . getType ( conditionCallBack ) === "function" ) {
419419 condition = conditionCallBack . call ( p , self . editorBody ) ;
420420 }
421421 combo . igCombo ( "closeDropDown" ) ;
0 commit comments