misskey-dev / misskey.js

Misskey SDK for JavaScript
MIT License
76 stars 25 forks source link

fix: apiでネイティブfetchを格納する際に無名関数でラップするように #29

Closed tamaina closed 3 years ago

tamaina commented 3 years ago

What

apiにブラウザネイティブのfetchを格納する際、そのまま代入せず無名関数でラップしたものを代入するように

Why

特にChromiumでは、ネイティブ関数をそのまま変数に代入して使おうとするとIllegal invocationエラーが発生する。

See https://github.com/misskey-dev/misskey/pull/7667#issuecomment-923162458

codecov[bot] commented 3 years ago

Codecov Report

Merging #29 (e1bf59c) into develop (f278390) will increase coverage by 0.02%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop      #29      +/-   ##
===========================================
+ Coverage    94.70%   94.72%   +0.02%     
===========================================
  Files            2        2              
  Lines          434      436       +2     
  Branches        51       52       +1     
===========================================
+ Hits           411      413       +2     
  Misses          23       23              
Impacted Files Coverage Δ
src/api.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f278390...e1bf59c. Read the comment docs.

syuilo commented 3 years ago

👍