Skip to content

Commit

Permalink
feat: enhance layer id handler
Browse files Browse the repository at this point in the history
  • Loading branch information
cnouguier committed Nov 22, 2021
1 parent a6a7d09 commit 0e76dc7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions capture.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,11 @@ async function getLayerCategoryId (page, layerId) {
if (parameters.layers) {
// Open the catalog
await clickSelector(page, '#right-opener')
await page.waitForTimeout(250)
await page.waitForTimeout(1000)
let openedCategories = []
for (let i = 0; i < parameters.layers.length; ++i) {
const layerId = parameters.layers[i]
let layerId = parameters.layers[i]
if (!_.startsWith(layerId, 'layers-')) layerId = 'layers-' + _.kebabCase(layerId)
const categoryId = await getLayerCategoryId(page, layerId)
if (categoryId) {
if (!openedCategories.includes(categoryId)) {
Expand Down

0 comments on commit 0e76dc7

Please sign in to comment.