From 3fba1fe4f08738b6c837020b6625e2d1237b9ea1 Mon Sep 17 00:00:00 2001 From: Konstantin Popov Date: Mon, 5 Jun 2017 18:26:27 +0300 Subject: [PATCH 1/2] Fixed exception in archive consumer. --- lib/consumers/archive-view.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/consumers/archive-view.js b/lib/consumers/archive-view.js index 52f68638..cba2def7 100644 --- a/lib/consumers/archive-view.js +++ b/lib/consumers/archive-view.js @@ -1,5 +1,6 @@ "use strict"; +const pathModule = require("path"); const {normalisePath} = require("alhadis.utils"); const ArchiveEntry = require("./archive-entry.js"); const Consumer = require("./consumer.js"); @@ -125,7 +126,7 @@ class ArchiveView extends Consumer { return elements .reverse() .map(el => el.firstElementChild.textContent) - .join("/"); + .join(pathModule.sep); } } From 7fd738a80093dc6421424c47f737872fd12c215a Mon Sep 17 00:00:00 2001 From: Konstantin Popov Date: Tue, 6 Jun 2017 13:15:09 +0300 Subject: [PATCH 2/2] Refactor module import. --- lib/consumers/archive-view.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/consumers/archive-view.js b/lib/consumers/archive-view.js index cba2def7..2b246a90 100644 --- a/lib/consumers/archive-view.js +++ b/lib/consumers/archive-view.js @@ -1,6 +1,6 @@ "use strict"; -const pathModule = require("path"); +const {sep} = require("path"); const {normalisePath} = require("alhadis.utils"); const ArchiveEntry = require("./archive-entry.js"); const Consumer = require("./consumer.js"); @@ -126,7 +126,7 @@ class ArchiveView extends Consumer { return elements .reverse() .map(el => el.firstElementChild.textContent) - .join(pathModule.sep); + .join(sep); } }