Oops we should register a service worker as long as it is supported.

This commit is contained in:
Guo Xiang Tan 2018-02-15 15:02:14 +08:00
parent 9c7d609575
commit 7902296c11

View File

@ -44,9 +44,7 @@
Discourse.SiteSettings = ps.get('siteSettings');
Discourse.LetterAvatarVersion = '<%= LetterAvatar.version %>';
Discourse.MarkdownItURL = '<%= asset_url('markdown-it-bundle.js') %>';
<%- if DiscoursePluginRegistry.service_workers.present? %>
Discourse.ServiceWorkerURL = '<%= Rails.application.assets_manifest.assets['service-worker.js'] %>'
<%- end %>
I18n.defaultLocale = '<%= SiteSetting.default_locale %>';
Discourse.start();
Discourse.set('assetVersion','<%= Discourse.assets_digest %>');