Skip to content

Commit caf2600

Browse files
Merge pull request rails#43419 from coiti/guides_actioncable_js
Fix JavaScript syntax error on Action Cable Overview [ci-skip]
2 parents fb1ab34 + 0b234d7 commit caf2600

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

guides/source/action_cable_overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ consumer.subscriptions.create("AppearanceChannel", {
585585
},
586586

587587
get documentIsActive() {
588-
return document.visibilityState == "visible" && document.hasFocus()
588+
return document.visibilityState === "visible" && document.hasFocus()
589589
},
590590

591591
get appearingOn() {
@@ -653,7 +653,7 @@ import consumer from "./consumer"
653653

654654
consumer.subscriptions.create("WebNotificationsChannel", {
655655
received(data) {
656-
new Notification(data["title"], body: data["body"])
656+
new Notification(data["title"], { body: data["body"] })
657657
}
658658
})
659659
```

0 commit comments

Comments
 (0)