[英]Javascript filter function return different result in production
我的代碼是:
audio_files = [{id: "78", isProfileImg: "1"},{id: "145", isProfileImg: "0"}];
console.log(audio_files.filter((x) => x.id == 78));
開發機器中的結果
[{…}]
0: {id: "78", isProfileImg: "1"}
length: 1
__proto__: Array(0)
導致生產
[{}]
0:length: 0
__proto__: Array(0)
有沒有人遇到過同樣的問題?
通過編輯 ID 檢測腳本解決
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.