diff --git a/browser/actors/ContextMenuChild.sys.mjs b/browser/actors/ContextMenuChild.sys.mjs index 9b6a09f4dcb8..5969bc25708d 100644 --- a/browser/actors/ContextMenuChild.sys.mjs +++ b/browser/actors/ContextMenuChild.sys.mjs @@ -920,7 +920,7 @@ export class ContextMenuChild extends JSWindowActorChild { context.onVideo = false; context.inPDFEditor = false; context.hasTextFragments = - !!this.contentWindow?.document?.fragmentDirective.getTextDirectiveRanges() + !!this.contentWindow?.document?.fragmentDirective?.getTextDirectiveRanges() .length; // Remember the node and its owner document that was clicked