From 1177a2ee31699c8851b03ddaf83963080f5f9957 Mon Sep 17 00:00:00 2001 From: chris <kokosias@yahoo.gr> Date: Tue, 1 Jun 2021 09:40:16 +0300 Subject: [PATCH] remove if --- wax-prosemirror-core/src/Application.js | 29 +++++++++++-------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/wax-prosemirror-core/src/Application.js b/wax-prosemirror-core/src/Application.js index 0d0fe6b80..63b621a86 100644 --- a/wax-prosemirror-core/src/Application.js +++ b/wax-prosemirror-core/src/Application.js @@ -13,28 +13,25 @@ export default class Application { registerServices() { let count = 0; - console.log(this.config); - if (this.config) { - while (count < this.config.get('config.services').length) { - const allServices = this.config.get('config.services'); - const service = this.config.get('config.services')[count]; - /* + while (count < this.config.get('config.services').length) { + const allServices = this.config.get('config.services'); + const service = this.config.get('config.services')[count]; + /* set App to every service so services can have access to containers and config */ - service.setApp(this); + service.setApp(this); - if (service.dependencies) { - const servicePos = count; - allServices.splice(servicePos + 1, 0, ...service.dependencies); - } - - if (service.register) { - service.register(); - } + if (service.dependencies) { + const servicePos = count; + allServices.splice(servicePos + 1, 0, ...service.dependencies); + } - count += 1; + if (service.register) { + service.register(); } + + count += 1; } } -- GitLab