Fix URL List showing scope accidentally (#1536)

fix call from when(...) to call function directly, avoid implicit true,
which results in page scope being shown for url list.
fixes #1535

To test:
1) Create new workflow of type URL List
2) Ensure the Crawl Scope drop down is not shown.

---------

Co-authored-by: sua yoo <sua@suayoo.com>
This commit is contained in:
Ilya Kreymer 2024-02-22 12:17:41 -08:00 committed by Ilya Kreymer
parent be1dc80e4a
commit ba18abc063

View File

@ -19,6 +19,7 @@ import {
import { when } from "lit/directives/when.js";
import { msg, localized, str } from "@lit/localize";
import { ifDefined } from "lit/directives/if-defined.js";
import { choose } from "lit/directives/choose.js";
import compact from "lodash/fp/compact";
import { mergeDeep } from "immutable";
import flow from "lodash/fp/flow";
@ -666,14 +667,11 @@ export class CrawlConfigEditor extends LiteElement {
<btrix-tab-panel name="newJobConfig-crawlSetup" class="scroll-m-3">
${this.renderPanelContent(
html`
${when(this.jobType === "url-list", this.renderUrlListSetup)}
${when(
this.jobType === "seed-crawl",
this.renderSeededCrawlSetup,
)}
${when(this.jobType === "custom", () =>
this.renderUrlListSetup(true),
)}
${choose(this.jobType, [
["url-list", () => this.renderUrlListSetup(false)],
["seed-crawl", () => this.renderSeededCrawlSetup()],
["custom", () => this.renderUrlListSetup(true)],
])}
`,
{ isFirst: true },
)}