Using smartPocket in Android phone give me this error: "Uncaught TypeError: Cannot read property 'toString' of null " in 1b3aqxj.js:formatted:12049.
I did a little of debugging and I found that the error is here e.navigator.userAgent.match(/Android (\d+.\d+)/) because the userAgent is a string like "Mozilla/5.0 (Linux; Android 9; moto x4) AppleWebKi…e Gecko) Chrome/73.0.3683.90 Mobile Safari/537.36" so the Android version doesn't have a decimal value and the match function return null so there is an error.
Using smartPocket in Android phone give me this error:
`"Uncaught TypeError: Cannot read property 'toString' of null " in 1b3aqxj.js:formatted:12049`.
I did a little of debugging and I found that the error is here `e.navigator.userAgent.match(/Android (\d+.\d+)/)` because the userAgent is a string like `"Mozilla/5.0 (Linux; Android 9; moto x4) AppleWebKi…e Gecko) Chrome/73.0.3683.90 Mobile Safari/537.36" `so the Android version doesn't have a decimal value and the match function return null so there is an error.
<!-- github-sync-id:435665278 -->
I solved by editing the file _data/combined/1b3aqxj.js
From e.navigator.userAgent.match(/Android (\d+.\d+)/).repl...
to e.navigator.userAgent.match(/Android (\d+)/).repl...
I know it's only a temporary solution but with this the gallery works again.
I solved by editing the file _data/combined/1b3aqxj.js
From
`e.navigator.userAgent.match(/Android (\d+.\d+)/).repl...`
to
`e.navigator.userAgent.match(/Android (\d+)/).repl...`
I know it's only a temporary solution but with this the gallery works again.
<!-- github-comment-id:485746518 -->
I can confirm this observation.
My solution is a little different, but the basic idea is the same.
I have sent a pull request [1]. Hopefully it helps with other people that prefer to browse the photos on a phone.
[1] https://github.com/Piwigo/Piwigo/pull/1045
<!-- github-comment-id:508094062 -->
@mozzenior your pull-request works nice. Thanks! I'm happy it works because the other solution would be rewrite the photoswipe implementation to match the new PhotoSwipe 4 API.
@mozzenior your pull-request works nice. Thanks! I'm happy it works because the other solution would be rewrite the photoswipe implementation to match the new PhotoSwipe 4 API.
<!-- github-comment-id:510862597 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Using smartPocket in Android phone give me this error:
"Uncaught TypeError: Cannot read property 'toString' of null " in 1b3aqxj.js:formatted:12049.I did a little of debugging and I found that the error is here
e.navigator.userAgent.match(/Android (\d+.\d+)/)because the userAgent is a string like"Mozilla/5.0 (Linux; Android 9; moto x4) AppleWebKi…e Gecko) Chrome/73.0.3683.90 Mobile Safari/537.36"so the Android version doesn't have a decimal value and the match function return null so there is an error.I solved by editing the file _data/combined/1b3aqxj.js
From
e.navigator.userAgent.match(/Android (\d+.\d+)/).repl...to
e.navigator.userAgent.match(/Android (\d+)/).repl...I know it's only a temporary solution but with this the gallery works again.
I can confirm this observation.
My solution is a little different, but the basic idea is the same.
I have sent a pull request [1]. Hopefully it helps with other people that prefer to browse the photos on a phone.
[1] https://github.com/Piwigo/Piwigo/pull/1045
@mozzenior your pull-request works nice. Thanks! I'm happy it works because the other solution would be rewrite the photoswipe implementation to match the new PhotoSwipe 4 API.