Cannot read property 'currentHierarchyNodeId' of undefined

This error occurs when you use createLabelQueryWidget but you did not pass renderer as an argument. To fix this error, debug the error and make sure you pass the renderer besides the sourceNode.


configureAsInlineAnchorToStructure(sxModule, 'self::fn', t('footnote'), {
    contextualOperations: [
        { name: ':contextual-insert-label--automatic' },
        { name: ':contextual-renumber-fn' }
    defaultTextContainer: 'p',
    createInnerJsonMl: function(sourceNode, renderer) {
        return [
            { 'cv-baseline': 'superscript' },
            createLabelQueryWidget('./label', { inline: true })(
                // Make sure to pass the renderer when using this widget in another widget or object: