pokerogue icon indicating copy to clipboard operation
pokerogue copied to clipboard

Changed How is local is checked and how serverURL is build to prevent…

Open CodeTappert opened this issue 1 year ago • 6 comments

… errros in offline mode

Fixes #1078

CodeTappert avatar May 19 '24 07:05 CodeTappert

Not having the window.location.hostname === '' check breaks the offline detection for local files, such as from my app :(

You mean for compiled files? Because this change works fine when run via "npm start dev".

Even if you serve dist folder it should work without problems

CodeTappert avatar May 19 '24 09:05 CodeTappert

This is indeed back to working. Also yeah, my app is serving compiled files and registers as an empty string for that check for whatever reason; I don't know the details behind it, but that is what happens for it. My Android apk registers normally as localhost though.

Admiral-Billy avatar May 19 '24 09:05 Admiral-Billy

This is indeed back to working. Also yeah, my app is serving compiled files and registers as an empty string for that check for whatever reason; I don't know the details behind it, but that is what happens for it. My Android apk registers normally as localhost though.

I readded the check for you

CodeTappert avatar May 19 '24 09:05 CodeTappert

Yep, that's what I was talking about; it works fine for my app's particular offline now. Now it's just up to the actual devs to see what they think of this change for their purposes heh

Admiral-Billy avatar May 19 '24 09:05 Admiral-Billy

As there were minor changes to the code, I tested this again and can confirm it fixes #1078

athias avatar May 19 '24 19:05 athias

This PR is ready to be reviewed/merged by a dev.

CodeTappert avatar May 23 '24 22:05 CodeTappert

This PR is ready to be reviewed/merged by a dev.

Walker says this is fine. See https://discord.com/channels/1125469663833370665/1243948971110694982

CodeTappert avatar May 27 '24 11:05 CodeTappert

Now it is consistent and breaks after || or && if it would be to long without the break

CodeTappert avatar May 27 '24 13:05 CodeTappert