@@ -4456,7 +4456,7 @@ export class ProjectView
44564456
44574457 async publishAsync ( name : string , description ?: string , screenshotUri ?: string , forceAnonymous ?: boolean ) : Promise < pxt . editor . ShareData > {
44584458 pxt . tickEvent ( "menu.embed.publish" , undefined , { interactiveConsent : true } ) ;
4459- if ( ( name && this . state . projectName != name ) || description ) {
4459+ if ( ( name && this . state . projectName != name ) || description !== undefined ) {
44604460 await this . updateHeaderNameAsync ( name , description ) ;
44614461 }
44624462
@@ -4606,18 +4606,18 @@ export class ProjectView
46064606
46074607 updateHeaderNameAsync ( name : string , description ?: string ) : Promise < void > {
46084608 // nothing to do?
4609- if ( pkg . mainPkg . config . name == name && ( ! description || pkg . mainPkg . config . description == description ) )
4609+ if ( pkg . mainPkg . config . name == name && ( description === undefined || pkg . mainPkg . config . description == description ) )
46104610 return Promise . resolve ( ) ;
46114611
46124612 //Save the name in the target MainPackage as well
46134613 pkg . mainPkg . config . name = name ;
4614- pkg . mainPkg . config . description = description || pkg . mainPkg . config . description ;
4614+ pkg . mainPkg . config . description = description !== undefined ? description : pkg . mainPkg . config . description ;
46154615
46164616 pxt . debug ( 'saving project name to ' + name ) ;
46174617 let f = pkg . mainEditorPkg ( ) . lookupFile ( "this/" + pxt . CONFIG_NAME ) ;
46184618 let config = JSON . parse ( f . content ) as pxt . PackageConfig ;
46194619 config . name = name ;
4620- config . description = description || config . description ;
4620+ config . description = description !== undefined ? description : config . description ;
46214621 return f . setContentAsync ( pxt . Package . stringifyConfig ( config ) )
46224622 . then ( ( ) => {
46234623 if ( this . state . header )
0 commit comments