don't use window.

This commit is contained in:
Gusted 2021-06-08 18:42:22 +02:00
parent 62791cda82
commit 6b9dafe4ef
No known key found for this signature in database
GPG Key ID: FD821B732837125F

View File

@ -17,7 +17,7 @@
) {
sendPostMessage({type: 'usw-remove-stylus-button'});
if (window.location.pathname === '/api/oauth/authorize_style/new') {
if (location.pathname === '/api/oauth/authorize_style/new') {
API.styles.find({_linking: true}).then(style => {
console.log(style);
sendPostMessage({type: 'usw-fill-new-style', data: style});