Uncaught TypeError: Cannot use 'in' operator to search for 'length'
script.js:2003 Uncaught TypeError: Cannot use 'in' operator to search for 'length'
The error seems to take place at line var length = !!obj && "length" in obj && obj.length, in
function isArrayLike( obj ) {
// Support: real iOS 8.2 only (not reproducible in simulator)
// `in` check used to prevent JIT error (gh-2145)
// hasOwn isn't used here due to false negatives
// regarding Nodelist length in IE
var length = !!obj && "length" in obj && obj.length,
type = jQuery.type( obj );
if ( type === "function" || jQuery.isWindow( obj ) ) {
return false;
}
return type === "array" || length === 0 ||
typeof length === "number" && length > 0 && ( length - 1 ) in obj;
}
@loretoparisi It is related by third party's source. If you give me a emaple cURL command or response, I'll try to fix it.
Any update on this?
@loretoparisi It is related by third party's source. If you give me a emaple cURL command or response, I'll try to fix it.
curl 'https://api.dabapiao.com/front/h5/search/shift-time' -H 'Accept: application/json, text/plain, /' -H 'Referer: https://h5.dabapiao.com/' -H 'Origin: https://h5.dabapiao.com' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36' -H 'DNT: 1' -H 'Content-Type: application/x-www-form-urlencoded' --data 'fromCityId=1&toCityId=2&upStationId=5&downStationId=22&__guestToken=PKEIPPKIXBUTBVDVNPFN&__lang=zh-cn' --compressed
I think it's this part "--data 'fromCityId=1&toCityId=2&upStationId=5&downStationId=22&__guestToken=PKEIPPKIXBUTBVDVNPFN&__lang=zh-cn' " that is triggering this issue
Hi I'm having same error on trying to load a Post curl, do you know how to fix or some way to avoid it? thank you