From dcff2f27caf7aecdacf115df069e61e2cd574a6f Mon Sep 17 00:00:00 2001 From: Joe Date: Mon, 26 Apr 2021 15:21:46 -0400 Subject: [PATCH] Fix javascript syntax --- guides/source/action_cable_overview.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guides/source/action_cable_overview.md b/guides/source/action_cable_overview.md index dabb2d59c4..a4582a4721 100644 --- a/guides/source/action_cable_overview.md +++ b/guides/source/action_cable_overview.md @@ -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}` }