Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postcss-advanced-variablesをどうにか最新に上げる #83

Closed
yumetodo opened this issue Feb 10, 2018 · 2 comments
Closed

postcss-advanced-variablesをどうにか最新に上げる #83

yumetodo opened this issue Feb 10, 2018 · 2 comments
Labels

Comments

@yumetodo
Copy link
Member

yumetodo commented Feb 10, 2018

from #81

どういうわけかCssSyntaxErrorを吐いて死ぬので原因を調べたい。

予想

@yumetodo yumetodo added the bug label Feb 10, 2018
@melpon
Copy link
Member

melpon commented Feb 10, 2018

load_implのasyncが取れているのはなぜ?

記憶が定かでは無いですが、元々のコードは、

  async load_impl(config) {
    ...
    this.meta = new Meta(this.log, config, ::this.onCodeFound)
    ...
  }
  async onCodeFound(id) {
    ...
    this.yatas.set(id, new Yata(this.log, this.wand, this.meta.getCode(id)))
  }

のように書かれていて、this.meta に値が代入される前に onCodeFound のコールバックが呼ばれることがあって、そこで this.meta を使おうとしてエラーになってたから除けたみたいな感じだった気がします。
今は meta を引数で渡しているので async でも問題ないかも。

@melpon
Copy link
Member

melpon commented Mar 4, 2020

最新にしたので閉じます

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants