UNPKG

@quillforms/blocklib-multiple-choice-block

Version:
16 lines 523 B
const getChoices = ({ attributes }) => { var _attributes$choices, _attributes$other; const choices = (_attributes$choices = attributes?.choices) !== null && _attributes$choices !== void 0 ? _attributes$choices : []; const other = (_attributes$other = attributes?.other) !== null && _attributes$other !== void 0 ? _attributes$other : false; if (other) { choices.push({ type: 'other', label: 'Other' }); } return choices; }; export default getChoices; //# sourceMappingURL=get-choices.js.map