Describe the bug
onAjaxResponse() crash with "Uncaught TypeError: Cannot read properties of undefined (reading 'search')" if ajax response doesn't contains data. E.g. on response from another script it the response is not json.
To Reproduce
Steps to reproduce the behavior:
open console
do Ajax request - e.g. $.ajax({dataType: 'json', url: "https://some.url" })
See error
Expected behavior
Not throw an exception.
Screenshots
Version info (please complete the following information):
Browser chrome
Version 98
Game HH/CxH
Platform HH.com, CxH.com
Additional context
It should be sufficient to modify onAjaxResponse in src\common\Helpers.js
instead of "~a.data.search(s)" test it first - "a.data && ~a.data.search(s)"
Describe the bug onAjaxResponse() crash with "Uncaught TypeError: Cannot read properties of undefined (reading 'search')" if ajax response doesn't contains data. E.g. on response from another script it the response is not json.
To Reproduce Steps to reproduce the behavior:
Expected behavior Not throw an exception.
Screenshots
Version info (please complete the following information):
Additional context
It should be sufficient to modify onAjaxResponse in src\common\Helpers.js instead of "~a.data.search(s)" test it first - "a.data && ~a.data.search(s)"