Skip to content

Commit

Permalink
一更
Browse files Browse the repository at this point in the history
  • Loading branch information
Utone committed Sep 18, 2019
1 parent 02dfee8 commit bdb8866
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/helper/huhu_config.js
Expand Up @@ -8,6 +8,7 @@ module.exports = function() {
valine: CONFIG.valine,
weather: CONFIG.weather,
algoliasearch: CONFIG.algoliasearch,
service_worker: CONFIG.service_worker,
service_worker: CONFIG.service_worker
}

Expand Down
4 changes: 3 additions & 1 deletion source/scripts/registerSW.js
@@ -1,7 +1,7 @@
/**
* ServiceWorker模块
*/
define('registerSW', ['jquery'], $ => {
define('registerSW', ['jquery'], function($) {
function register() {
navigator.serviceWorker
.register('/sw.js', { scope: `/` })
Expand Down Expand Up @@ -50,6 +50,8 @@ define('registerSW', ['jquery'], $ => {

if (
HUHU_CONFIG &&
HUHU_CONFIG.service_worker &&
HUHU_CONFIG.service_worker.open &&
'serviceWorker' in navigator &&
window.caches &&
navigator.serviceWorker.getRegistration
Expand Down

0 comments on commit bdb8866

Please sign in to comment.