Skip to content

Commit

Permalink
Merge pull request #42081 from jharrilim/patch-1
Browse files Browse the repository at this point in the history
Docs - ActionCable Overview - Syntax Error
  • Loading branch information
zzak committed Apr 28, 2021
2 parents 2afb94a + dcff2f2 commit 4913525
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions guides/source/action_cable_overview.md
Expand Up @@ -266,9 +266,9 @@ WebSocket is opened.
createConsumer('https://ws.example.com/cable')

// Use a function to dynamically generate the URL
createConsumer(getWebSocketURL)
createConsumer(getWebSocketURL())

function getWebSocketURL {
function getWebSocketURL() {
const token = localStorage.get('auth-token')
return `https://ws.example.com/cable?token=${token}`
}
Expand Down

0 comments on commit 4913525

Please sign in to comment.