QwikDev/qwik

[๐Ÿž] plugin:vite:esbuild] [plugin vite:esbuild] src/components/router-head/router-head.tsx: Duplicate key "dangerouslySetInnerHTML"

notcod opened this issue ยท 3 comments

Which component is affected?

Qwik Runtime

Describe the bug

Fresh npm create qwik@latest

[plugin:vite:esbuild] [plugin vite:esbuild] src/components/router-head/router-head.tsx: Duplicate key "dangerouslySetInnerHTML" in object literal
40 |                          return s.style;
41 |                      },
42 |                      dangerouslySetInnerHTML: _wrapSignal(s, "style")
   |                      ^
43 |                  }, null, 0, s.key))
44 |          ]

warning is in "@builder.io/qwik": "1.5.2",
in version 1.5.1 there is no warning

Reproduction

/

Steps to reproduce

No response

System Info

/

Additional Information

No response

I have the same issue after the last update.

@ohkimur
Me too.

here's the fix

      {head.meta.map((m) => (
        <meta key={m.key} {...m} />
      ))}

      {head.links.map((l) => (
        <link key={l.key} {...l} />
      ))}

      {head.styles.map((s) => (
        <style
          key={s.key}
          {...s.props}
          {...(s.props?.dangerouslySetInnerHTML
            ? {}
            : { dangerouslySetInnerHTML: s.style })}
        />
      ))}

      {head.scripts.map((s) => (
        <script
          key={s.key}
          {...s.props}
          {...(s.props?.dangerouslySetInnerHTML
            ? {}
            : { dangerouslySetInnerHTML: s.script })}
        />
      ))}
    </>
  );
});