INNER CODE UNIT · JavaScript
callback
mapbox/mapbox-gl-native · platform/node/index.js:26
var callback = function() {
var args = arguments;
if (!responded) {
responded = true;
process.nextTick(function() {
req.respond.apply(req, args);
});
} else {
console.warn('request function responded multiple times; it should call the callback only once');
}
};
try {
request(req, callback);
} catch (e) {
console.warn('request function threw an exception; it should call the callback with an error instead');
callback(e);
}