Closed sunwrobert closed 2 years ago
…ad of replace
Using just replace leads to the following string:
'function(payload, callback) { var _this = this; var request = this._prepareRequest(); request.onreadystatechange = function () { if (request.readyState === 4 && request.timeout !== 1) { var result = request.responseText; var error = null; try { result = JSON.parse(result); } catch (e) { error = errors.InvalidResponse(request.responseText); } _this.connected = true; callback(error, result); } }; request.ontimeout = function () { _this.connected = false; callback(errors.ConnectionTimeout(this.timeout)); }; try { request.send(JSON.stringify(payload)); } catch (error) { this.connected = false; callback(errors.InvalidConnection(this.host)); } }'
which doesn't check correctly for 'function(payload,callback)'
'function(payload,callback)'
[WIP]
…ad of replace
Description
Using just replace leads to the following string:
which doesn't check correctly for
'function(payload,callback)'
Testing instructions
Types of changes
Checklist:
[WIP]
if necessary.