Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Update Custom Window Options #38

Merged
merged 2 commits into from
Jan 12, 2021

Conversation

bennetty
Copy link
Contributor

Pull Request is partenered with asticode/go-astilectron#304

This will fix issue: asticode/go-astilectron#297

Copy link
Owner

@asticode asticode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR is almost perfect.

Just a minor change though

index.js Outdated
if (typeof json.windowOptions.custom.messageBoxOnClose !== "undefined") {
let buttonId = dialog.showMessageBoxSync(null, json.windowOptions.custom.messageBoxOnClose)
if (typeof json.windowOptions.custom.messageBoxOnClose.confirmId !== "undefined" && json.windowOptions.custom.messageBoxOnClose.confirmId !== buttonId) {
if (typeof windowOptions[json.targetID].custom !== "undefined") {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should add typeof windowOptions[json.targetID] !== "undefined" as well in the if:

if (typeof windowOptions[json.targetID] !== "undefined" && typeof windowOptions[json.targetID].custom !== "undefined")

@bennetty bennetty requested a review from asticode January 12, 2021 10:10
@asticode asticode merged commit d128a6f into asticode:master Jan 12, 2021
@asticode
Copy link
Owner

FYI I've created a v0.43.0 tag

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants