diff --git a/src/preferences-app.js b/src/preferences-app.js index 57e529782..e2b1efe9d 100644 --- a/src/preferences-app.js +++ b/src/preferences-app.js @@ -99,9 +99,4 @@ const Preferences = GObject.registerClass({ } }); -const prefs = new Preferences(); -if (prefs.hasOwnProperty('runAsync')) - await prefs.runAsync([system.programInvocationName].concat(ARGV)); -else - prefs.run([system.programInvocationName].concat(ARGV)); - +await (new Preferences()).runAsync([system.programInvocationName].concat(ARGV)); diff --git a/src/service/daemon.js b/src/service/daemon.js index a4291d772..1ddb3569f 100755 --- a/src/service/daemon.js +++ b/src/service/daemon.js @@ -698,8 +698,5 @@ const Service = GObject.registerClass({ } }); -const service = new Service(); -if (service.hasOwnProperty('runAsync')) - await service.runAsync([system.programInvocationName].concat(ARGV)); -else - service.run([system.programInvocationName].concat(ARGV)); +await (new Service()).runAsync([system.programInvocationName].concat(ARGV)); +