morethan-log
morethan-log copied to clipboard
[Bug]: Utterances.tsx config build error
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
- Go to ...
- Click on ...
- Scroll down to ..
- See error
Browser
Mac
Validations
- [X] Follow our Code of Conduct
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.