From e3e22e3bac5f5e93680c0d649c8d79a41bb83670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Thu, 13 Mar 2025 11:52:30 +0000 Subject: [PATCH] Bug 1952856 - Deal with text fragments disabled for now. r=jjaschke I don't think this is worth a test tbh. We can remove the null-check when we remove the pref. Differential Revision: https://phabricator.services.mozilla.com/D241359 --- browser/actors/ContextMenuChild.sys.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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