Fix: don't set updateUrl to a local file

This commit is contained in:
eight 2017-09-18 07:39:46 +08:00
parent 90ca2f2d23
commit 94e5336018

View File

@ -8,7 +8,7 @@ function install(style) {
const request = Object.assign(style, { const request = Object.assign(style, {
method: 'saveUsercss', method: 'saveUsercss',
reason: 'update', reason: 'update',
updateUrl: location.href updateUrl: location.protocol === 'file:' ? null : location.href
}); });
return runtimeSend(request) return runtimeSend(request)
.then(result => { .then(result => {