@datocms/astro 0.6.6 → 0.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -34,7 +34,7 @@ export interface Props {
|
|
|
34
34
|
*
|
|
35
35
|
* - `true`: Enable click-to-edit mode immediately
|
|
36
36
|
* - `{ scrollToNearestTarget: true }`: Enable and scroll to nearest editable if none visible
|
|
37
|
-
* - `undefined`: Don't enable automatically (use Alt/Option key to toggle)
|
|
37
|
+
* - `false` or `undefined`: Don't enable automatically (use Alt/Option key to toggle)
|
|
38
38
|
*
|
|
39
39
|
* @example
|
|
40
40
|
* ```astro
|
|
@@ -145,8 +145,8 @@ const enableClickToEditValue =
|
|
|
145
145
|
document.addEventListener('astro:page-load', this.pageLoadHandler);
|
|
146
146
|
|
|
147
147
|
// Enable click-to-edit mode if requested via prop
|
|
148
|
-
if (enableClickToEdit
|
|
149
|
-
if (
|
|
148
|
+
if (enableClickToEdit) {
|
|
149
|
+
if (enableClickToEdit === true) {
|
|
150
150
|
this.controller.enableClickToEdit();
|
|
151
151
|
} else {
|
|
152
152
|
this.controller.enableClickToEdit(enableClickToEdit);
|