@augment-vir/common
Advanced tools
Comparing version 21.3.5 to 21.3.6
@@ -57,3 +57,16 @@ "use strict"; | ||
try { | ||
return inputs.callback(); | ||
const returnValue = inputs.callback(); | ||
if (returnValue instanceof Promise) { | ||
return returnValue.catch((error) => { | ||
if (inputs.catchCallback) { | ||
return inputs.catchCallback(error); | ||
} | ||
else { | ||
return inputs.fallbackValue; | ||
} | ||
}); | ||
} | ||
else { | ||
return returnValue; | ||
} | ||
} | ||
@@ -60,0 +73,0 @@ catch (error) { |
@@ -49,3 +49,16 @@ import { isTruthy } from './boolean'; | ||
try { | ||
return inputs.callback(); | ||
const returnValue = inputs.callback(); | ||
if (returnValue instanceof Promise) { | ||
return returnValue.catch((error) => { | ||
if (inputs.catchCallback) { | ||
return inputs.catchCallback(error); | ||
} | ||
else { | ||
return inputs.fallbackValue; | ||
} | ||
}); | ||
} | ||
else { | ||
return returnValue; | ||
} | ||
} | ||
@@ -52,0 +65,0 @@ catch (error) { |
{ | ||
"name": "@augment-vir/common", | ||
"version": "21.3.5", | ||
"version": "21.3.6", | ||
"homepage": "https://github.com/electrovir/augment-vir/tree/main/packages/common", | ||
@@ -5,0 +5,0 @@ "bugs": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
173193
4188