@atlaskit/editor-plugin-block-menu
Version:
BlockMenu plugin for @atlaskit/editor-core
13 lines • 446 B
JavaScript
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
export var unwrapStep = function unwrapStep(nodes) {
var outputNodes = [];
nodes.forEach(function (node) {
// we may want to just skip the original instead of using it
if (node.children.length === 0) {
outputNodes.push(node);
} else {
outputNodes.push.apply(outputNodes, _toConsumableArray(node.children));
}
});
return outputNodes;
};