mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-23 21:55:48 +00:00
Convert getPathFind and add unit test
This commit is contained in:
@@ -38,7 +38,14 @@ function composeAsync(wrapper, callback) {
|
||||
callback(error);
|
||||
return;
|
||||
}
|
||||
callback(null, wrapper(data));
|
||||
let result;
|
||||
try {
|
||||
result = wrapper(data);
|
||||
} catch (exception) {
|
||||
callback(exception);
|
||||
return;
|
||||
}
|
||||
callback(null, result);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user