UNPKG

@commodo/fields-storage-ref

Version:

We're working hard to get all the docs in order. New articles will be added daily.

26 lines (20 loc) 577 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _name = require("@commodo/name"); var _fieldsStorage = require("@commodo/fields-storage"); var _default = ({ parent, name }) => { if (!(0, _fieldsStorage.hasWithStorage)(parent)) { throw Error(`"ref" field ${name} has a parent with no "withStorage" applied.`); } if (!(0, _name.hasName)(parent)) { throw Error(`"ref" field ${name} has a parent with no name assigned.`); } }; exports.default = _default; //# sourceMappingURL=checkParent.js.map