cssinjs/jss

Extend function property values are converted to strings

Open

#1,134 建立於 2019年6月17日

在 GitHub 查看
 (0 留言) (2 反應) (0 負責人)JavaScript (434 fork)batch import
bughelp wanted

倉庫指標

Star
 (7,000 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Expected behavior: A clear and concise description of what you expected to happen.

const styles = {
  linkCommon: {
    color: () => "orange"
  },
  link: {
    extend: "linkCommon"
  }
};

The link should be orange.

Describe the bug: A clear and concise description of what happend instead of the expected behavior.

The function is being converted to a string before being inserted into the DOM.

image

Codesandbox link:

Playground: https://codesandbox.io/embed/core-jss-playground-ef0j4

Versions (please complete the following information):

  • jss: 10 alpha 18
  • jss-preset-default: 10 alpha 18
  • Browser Chrome 75
  • OS: OX X

Feel free to add any additional versions which you may think are relevant to the bug.

Not to be confused with https://github.com/cssinjs/jss/issues/479

貢獻者指南