Skip to content

Commit

Permalink
fix: TypeError: Cannot read property 'file' of undefined
Browse files Browse the repository at this point in the history
Close #2823
  • Loading branch information
develar committed Apr 27, 2018
1 parent afec1dd commit eb6e01a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/electron-builder-lib/src/platformPackager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,13 +537,13 @@ export abstract class PlatformPackager<DC extends PlatformSpecificBuildOptions>
}

protected async getOrConvertIcon(format: IconFormat): Promise<string | null> {
const sourceNames = [`icon.${format === "set" ? "png" : format}`, "icon.png", "icons"]

const iconPath = this.platformSpecificBuildOptions.icon || this.config.icon
if (iconPath != null) {
const iconInfos = await this.resolveIcon([iconPath], format)
return (iconInfos)[0].file
sourceNames.unshift(iconPath)
}

const sourceNames = [`icon.${format === "set" ? "png" : format}`, "icon.png", "icons"]
if (format === "ico") {
sourceNames.push("icon.icns")
}
Expand Down

0 comments on commit eb6e01a

Please sign in to comment.