fix: network error at ajax detection (cherry picked from commit 3d644a893fc359553d587056612390e346525c93)