Files
pole-book/server/node_modules/react-query/lib/react/utils.js

16 lines
563 B
JavaScript

"use strict";
exports.__esModule = true;
exports.shouldThrowError = shouldThrowError;
function shouldThrowError(suspense, _useErrorBoundary, params) {
// Allow useErrorBoundary function to override throwing behavior on a per-error basis
if (typeof _useErrorBoundary === 'function') {
return _useErrorBoundary.apply(void 0, params);
} // Allow useErrorBoundary to override suspense's throwing behavior
if (typeof _useErrorBoundary === 'boolean') return _useErrorBoundary; // If suspense is enabled default to throwing errors
return !!suspense;
}