tabbar : bug fix
authorJinhyuk Jun <jinhyuk.jun@samsung.com>
Mon, 21 Jan 2013 04:14:00 +0000 (13:14 +0900)
committerYoumin Ha <youmin.ha@samsung.com>
Tue, 22 Jan 2013 05:26:05 +0000 (14:26 +0900)
skip grid api call no <li> element exist

Change-Id: Ifee8dc5a5262eb4d8ed0105615868b2c319e1ef2

src/widgets/tabbar/js/jquery.mobile.tizen.tabbar.js

index f176d4c..0d0a9e5 100755 (executable)
                                }
                                $tabbar.find( "li" ).css( "width", window.innerWidth / this.options.defaultList + "px" );
                        } else {
-                               $tabbar.addClass( "ui-navbar" )
-                                       .find( "ul" )
-                                       .grid( { grid: this.options.grid } );
+                               if ( $tabbar.find( "ul" ).children().length ) {
+                                       $tabbar.addClass( "ui-navbar" )
+                                               .find( "ul" )
+                                               .grid( { grid: this.options.grid } );
+                               }
                        }
 
                        if ( $tabbar.parents( ".ui-footer" ).length  ) {