@mopinion/survey
Version:
Collect customer feedback with the Mopinion survey library
18 lines (17 loc) • 724 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.showConversationalError = showConversationalError;
function showConversationalError(_ref) {
var _block$properties;
var _ref$block = _ref.block,
block = _ref$block === void 0 ? {} : _ref$block,
_ref$state = _ref.state,
state = _ref$state === void 0 ? {} : _ref$state;
if (block.typeName === 'email' && block !== null && block !== void 0 && (_block$properties = block.properties) !== null && _block$properties !== void 0 && _block$properties.business_only && state.isLoading) {
return state.errorReason !== 'business_email_invalid';
}
return state.showError && state.inputSet;
}
//# sourceMappingURL=index.js.map