chore(modules/storage): make process launcher callback optional

We aren't always interested in calling a function after the storage
process has been launched, so passing a callback should be optional.
This commit is contained in:
Pascal Precht 2018-10-11 12:25:09 +02:00
parent 41176f0f70
commit de901b73fc
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
1 changed files with 2 additions and 0 deletions

View File

@ -86,6 +86,8 @@ class StorageProcessesLauncher {
launchProcess(storageName, callback) { launchProcess(storageName, callback) {
const self = this; const self = this;
callback = callback || function () {};
if (self.processes[storageName]) { if (self.processes[storageName]) {
return callback(__('Storage process already started')); return callback(__('Storage process already started'));
} }