all: catch some undef errors
This commit is contained in:
parent
4dbc572ea1
commit
f5091b9267
6 changed files with 9 additions and 8 deletions
|
|
@ -24,7 +24,7 @@ export default function uiFileUpload(types, ok, error) {
|
|||
uiLoading(locales('loading_upload'))
|
||||
|
||||
reader.onerror = reader.onabort = function() {
|
||||
loader.close()
|
||||
uiLoading(false)
|
||||
error()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -509,7 +509,8 @@ class ScriptVm extends Vm {
|
|||
|
||||
this.checkContext('runAs')
|
||||
|
||||
var widgets = this.resolveId(id)
|
||||
var widgets = this.resolveId(id),
|
||||
widget = this.getWidget()
|
||||
|
||||
if (widgets.length) {
|
||||
|
||||
|
|
@ -529,10 +530,10 @@ class ScriptVm extends Vm {
|
|||
|
||||
this.checkContext('reload')
|
||||
|
||||
var options = this.getValueOptions()
|
||||
var options = this.getValueOptions(),
|
||||
widget = this.getWidget()
|
||||
|
||||
if (options.onCreate) {
|
||||
var widget = this.getWidget()
|
||||
widget.errorProp('onCreate', '', 'reload() cannot be called from onCreate')
|
||||
} else if (options.send){
|
||||
if (keepState) ipc.trigger('reload')
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ if (settings.remote.read('checkForUpdates') && navigator.onLine) {
|
|||
|
||||
if (settings.remote.read('alwaysOnTop')) {
|
||||
|
||||
remote.getCurrentWindow().setAlwaysOnTop(true)
|
||||
settings.remote.getCurrentWindow().setAlwaysOnTop(true)
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ function startLauncher() {
|
|||
stopServer: stopServerProcess
|
||||
})
|
||||
|
||||
launcher.on('will-close', ()=>{
|
||||
launcher.on('will-close', (e)=>{
|
||||
if (clientWindows.some(w=>w && !w.isDestroyed())) {
|
||||
launcher.hide()
|
||||
e.preventDefault()
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ class WebServer extends EventEmitter {
|
|||
|
||||
this.server.on('error', (e)=>{
|
||||
if (e.code === 'EADDRINUSE') {
|
||||
console.error(`(ERROR, HTTP) Could not open port ${oscInPort} (already in use) `)
|
||||
console.error(`(ERROR, HTTP) Could not open port ${this.port} (already in use) `)
|
||||
} else {
|
||||
console.error(`(ERROR, HTTP) ${e.message}`)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ argv = yargs(argv)
|
|||
.options(options)
|
||||
.check((argv)=>{
|
||||
var err = []
|
||||
for (key in options) {
|
||||
for (let key in options) {
|
||||
if (options[key].check && argv[key] != undefined) {
|
||||
var c = options[key].check(argv[key],argv)
|
||||
if (c!==true) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue