@@ -398,15 +398,16 @@ module.exports = baseModal.extend({
398398 $currentIframe = this . $buyWizardMap . find ( 'iframe' ) ;
399399 $currentIframe . addClass ( 'blurMore' ) ;
400400
401- if ( address && address . street && address . city && address . state && address . postal_code ) {
402- addressString = address . street + ", " + address . city + ", " + address . state + " " + address . postal_code + " " + address . displayCountry ;
401+ if ( address ) {
402+ addressString = address . street + " " + address . city + " " + address . state + " " + address . postal_code + " " + address . displayCountry ;
403+ addressString = addressString . trim ( ) ;
403404 } else {
404405 // if address is invalid, we'll create a dummy address for which google maps will show a map of the world
405406 addressString = "123 Street, City, State 12345 Country" ;
406407 }
407408
408409 addressString = encodeURIComponent ( addressString ) ;
409- var $iFrame = $ ( '<iframe class="js-iframe-pending positionTop" width="525" height="250" frameborder="0" style="border:0; margin-top: 0; height: 250px; clip: rect(0,0,0 ,0)" />' ) ;
410+ var $iFrame = $ ( '<iframe class="js-iframe-pending positionTop" width="525" height="250" frameborder="0" style="border:0; margin-top: 0; height: 250px; clip: rect(0,525px,250px ,0)" />' ) ;
410411
411412 if ( $currentIframe . length ) {
412413 this . $buyWizardMap . find ( '.js-mapSpinner' ) . removeClass ( 'hide' ) ;
@@ -463,6 +464,7 @@ module.exports = baseModal.extend({
463464 this . showMaps ( ) ;
464465 if ( this . userModel . get ( 'shipping_addresses' ) . length === 0 ) {
465466 this . createNewAddress ( ) ;
467+ this . displayMap ( ) ;
466468 $ ( '.js-buyWizardAddressBack' ) . show ( ) ;
467469 $ ( '.js-buyWizardNewAddressCancel' ) . hide ( ) ;
468470 }
0 commit comments