diff options
| author | Sander Ferdinand <sa.ferdinand@gmail.com> | 2018-03-27 20:41:42 +0200 |
|---|---|---|
| committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-03-29 23:04:04 +0100 |
| commit | da2c6e8bc82d10a358748d83dabaa963ea64054e (patch) | |
| tree | d20f8feefa48f11f48a9e9f6fb43f068768fd913 /wizard/WizardDaemonSettings.qml | |
| parent | 0bfff8844e113d36a538d2bb0109541a3edc95e6 (diff) | |
| download | monzero-gui-da2c6e8bc82d10a358748d83dabaa963ea64054e.tar.gz monzero-gui-da2c6e8bc82d10a358748d83dabaa963ea64054e.tar.xz monzero-gui-da2c6e8bc82d10a358748d83dabaa963ea64054e.zip | |
Fixes javascript error; .trim() on undefined
Diffstat (limited to 'wizard/WizardDaemonSettings.qml')
| -rw-r--r-- | wizard/WizardDaemonSettings.qml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/wizard/WizardDaemonSettings.qml b/wizard/WizardDaemonSettings.qml index bec134df..ac19aa87 100644 --- a/wizard/WizardDaemonSettings.qml +++ b/wizard/WizardDaemonSettings.qml @@ -183,7 +183,14 @@ ColumnLayout { opacity: localNode.checked id: bootstrapNodeEdit daemonAddrText: persistentSettings.bootstrapNodeAddress.split(":")[0].trim() - daemonPortText: (persistentSettings.bootstrapNodeAddress.split(":")[1].trim() == "") ? "18081" : persistentSettings.bootstrapNodeAddress.split(":")[1] + daemonPortText: { + var node_split = persistentSettings.bootstrapNodeAddress.split(":"); + if(node_split.length == 2){ + (node_split[1].trim() == "") ? "18081" : node_split[1]; + } else { + return "" + } + } } } |
