From ee7bf4b3f90b5393ee8390ab31fc412895e5138b Mon Sep 17 00:00:00 2001 From: Ivan Kopeykin Date: Mon, 28 Feb 2022 15:22:22 +0300 Subject: [PATCH] refactor identifier --- lib/ContextModule.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/ContextModule.js b/lib/ContextModule.js index 3b0bcced413..abf8ed365ed 100644 --- a/lib/ContextModule.js +++ b/lib/ContextModule.js @@ -317,13 +317,11 @@ class ContextModule extends Module { } else if (this.options.resource === false) { identifier = "false"; } else { - const arr = []; - for (const res of this.options.resource) { - arr.push( + identifier = this.options.resource + .map(res => contextify(options.context, res, options.associatedObjectForCache) - ); - } - identifier = arr.join(" "); + ) + .join(" "); } if (this.layer) identifier = `(${this.layer})/${identifier}`;