morethan-log icon indicating copy to clipboard operation
morethan-log copied to clipboard

[Bug]: Utterances.tsx config build error

Open SEOKKAMONI opened this issue 1 year ago • 0 comments

Describe the bug

- info Linting and checking validity of types ...Failed to compile.

./src/routes/Detail/PostDetail/CommentBox/Utterances.tsx:28:11
Type error: Type '{ repo: string | undefined; "issue-term": string; label: string; }' is not assignable to type '{ [key: string]: string; }'.
  Property 'repo' is incompatible with index signature.
    Type 'string | undefined' is not assignable to type 'string'.
      Type 'undefined' is not assignable to type 'string'.

  26 |     script.setAttribute("issue-term", issueTerm)
  27 |     script.setAttribute("theme", theme)
> 28 |     const config: { [key: string]: string } = CONFIG.utterances.config
     |           ^
  29 |     Object.keys(config).forEach((key) => {
  30 |       script.setAttribute(key, config[key])
  31 |     })
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

To reproduce

  1. Go to ...
  2. Click on ...
  3. Scroll down to ..
  4. See error

Browser

Mac

Validations

SEOKKAMONI avatar Aug 24 '23 12:08 SEOKKAMONI