UNPKG

@wordpress/editor

Version:
39 lines (29 loc) 714 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _lodash = require("lodash"); var _data = require("@wordpress/data"); var _blockEditor = require("@wordpress/block-editor"); /** * External dependencies */ /** * WordPress dependencies */ function DocumentOutlineCheck({ blocks, children }) { const headings = (0, _lodash.filter)(blocks, block => block.name === 'core/heading'); if (headings.length < 1) { return null; } return children; } var _default = (0, _data.withSelect)(select => ({ blocks: select(_blockEditor.store).getBlocks() }))(DocumentOutlineCheck); exports.default = _default; //# sourceMappingURL=check.js.map