浏览代码

Rename CookieStore to CookiesStore

Jasper van Merle 6 年之前
父节点
当前提交
b23b81e693

+ 1 - 1
assets/javascripts/app/app.coffee

@@ -78,7 +78,7 @@
         .install()
       @previousErrorHandler = onerror
       window.onerror = @onWindowError.bind(@)
-      CookieStore.onBlocked = @onCookieBlocked
+      CookiesStore.onBlocked = @onCookieBlocked
     return
 
   bootOne: ->

+ 2 - 1
assets/javascripts/app/settings.coffee

@@ -33,7 +33,8 @@ class app.Settings
     analyticsConsent: false
 
   constructor: ->
-    @store = new CookieStore
+    @store = new CookiesStore
+    console.log @store
     @cache = {}
 
   get: (key) ->

+ 5 - 1
assets/javascripts/lib/cookie_store.coffee → assets/javascripts/lib/cookies_store.coffee

@@ -1,4 +1,8 @@
-class @CookieStore
+class @CookiesStore
+  # Intentionally called CookiesStore instead of CookieStore
+  # Calling it CookieStore causes issues when the Experimental Web Platform features flag is enabled in Chrome
+  # Related issue: https://github.com/freeCodeCamp/devdocs/issues/932
+
   INT = /^\d+$/
 
   @onBlocked: ->