Skip to content

Commit 1fa8591

Browse files
committed
feat: support _editor_link and _editorLink as flags in component data
1 parent 237291d commit 1fa8591

File tree

1 file changed

+5
-1
lines changed
  • javascript-modules/live/lib/app

1 file changed

+5
-1
lines changed

javascript-modules/live/lib/app/core.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,11 @@ export const hydrateEditorLinks = async (liveInstance, documentNode, pathsInScop
199199
for (let { startNode, endNode, params, pathStack, scope, name } of components) {
200200
// By default, don't add editor links for bookshop shared includes
201201
const isStandardComponent = liveInstance.resolveComponentType(name) === 'component';
202-
const editorLinkFlag = scope?.editorLink ?? scope?.editor_link ?? isStandardComponent;
202+
const editorLinkFlag = scope?.editorLink
203+
?? scope?.editor_link
204+
?? scope?._editorLink
205+
?? scope?._editor_link
206+
?? isStandardComponent;
203207
if (editorLinkFlag) { // If we should be adding an editor link _for this component_
204208
let editorLink = null;
205209
for (const [, identifier] of params) {

0 commit comments

Comments
 (0)