mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-16 22:10:25 +00:00
Fix for issue 1708 - nightbuild close dialog throwing error
- Check the returned active object to see if it is valid before attempting to extract the transition out of it. Default to $.mobile.defaultDialogTransition if there is no active object.
This commit is contained in:
parent
a4ee2d5bbb
commit
923b047e75
1 changed files with 2 additions and 1 deletions
|
|
@ -45,8 +45,9 @@ $.widget( "mobile.dialog", $.mobile.widget, {
|
|||
}
|
||||
|
||||
if( $targetel.length && !$targetel.jqmData("transition") ){
|
||||
var active = $.mobile.urlHistory.getActive();
|
||||
$targetel
|
||||
.attr("data-" + $.mobile.ns + "transition", $.mobile.urlHistory.getActive().transition )
|
||||
.attr("data-" + $.mobile.ns + "transition", ( active ? active.transition : $.mobile.defaultDialogTransition ) )
|
||||
.attr("data-" + $.mobile.ns + "direction", "reverse");
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue