[doc] 正方选课系统 filter 参数顺序不按照 ESM 规范 #9
ceilf6
announced in
Announcements
Replies: 1 comment
-
|
对于污染问题统一用猴子补丁🍮处理 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
我在支持时间过滤的时候发现过滤数组一直被清空,然后我打了一堆调试发现是在 .filter 后时间过滤器数组就被清空了,我一脸懵啊,然后我检查了我的脚本的上下文逻辑一直没找到问题,我就想着会不会不是我的问题,是 filter 的问题?然后我去打印了一下
Array.prototype.filter.toString()
一看...
ESM规定的正确的 callback 参数顺序是 value, index, array
但是它重写成了 d, this[d], this
...
然后我就用
套了一下
但是我感觉虽然这个 iframe 没有加载资源只是为了拿个干净、开销相对较小,但是肯定不如直接遍历手筛来的无需资源一些
Beta Was this translation helpful? Give feedback.
All reactions