« get me outta code hell

mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/general-util.js
diff options
context:
space:
mode:
Diffstat (limited to 'general-util.js')
-rw-r--r--general-util.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/general-util.js b/general-util.js
index e352960..0f5bdd5 100644
--- a/general-util.js
+++ b/general-util.js
@@ -311,7 +311,7 @@ parseOptions.handleDashless = Symbol()
 
 module.exports.parseOptions = parseOptions
 
-module.exports.silenceEvents = function(emitter, eventsToSilence, callback) {
+module.exports.silenceEvents = async function(emitter, eventsToSilence, callback) {
   const oldEmit = emitter.emit
 
   emitter.emit = function(event, ...data) {
@@ -320,7 +320,7 @@ module.exports.silenceEvents = function(emitter, eventsToSilence, callback) {
     }
   }
 
-  callback()
+  await callback()
 
   emitter.emit = oldEmit
 }