@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
@@ -2,7 +2,7 @@
2
2
  "name": "@datocms/astro",
3
3
  "description": "A set of components and utilities to work faster with DatoCMS in Astro projects.",
4
4
  "type": "module",
5
- "version": "0.6.6",
5
+ "version": "0.6.7",
6
6
  "sideEffects": false,
7
7
  "repository": {
8
8
  "type": "git",
@@ -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 !== undefined) {
149
- if (typeof enableClickToEdit === 'boolean') {
148
+ if (enableClickToEdit) {
149
+ if (enableClickToEdit === true) {
150
150
  this.controller.enableClickToEdit();
151
151
  } else {
152
152
  this.controller.enableClickToEdit(enableClickToEdit);