Hi there,
today, I got this error when trying to use the selected text in my forge app which is providing an inline dialog called from the context menu
There was an error invoking the function - Cannot read property 'selectedText' of undefined
TypeError: Cannot read property 'selectedText' of undefined
at Object.App [as type] (webpack:///src/index.jsx:6)
at /tmp/tunnel82xWGVL825Cce/index.js:9054:36
at asyncMap (webpack:///node_modules/@forge/ui/dist/cjs/reconcile.js:13)
at /tmp/tunnel82xWGVL825Cce/index.js:9014:35
at Object.exports.processAuxElement (webpack:///node_modules/@forge/ui/dist/cjs/reconcile.js:113)
at /tmp/tunnel82xWGVL825Cce/index.js:8939:49
at Reference.value (bootstrap.js:1:8667)
I didn’t change anything in my code, 2 weeks ago it was working. Now it is not working anymore. Do you have an idea why?
I try to get the selected text in my code this way:
const {extensionContext: {selectedText}} = useProductContext();
Why is it not working anymore?