global settings: remove trailing slash from global address#2352
Conversation
| return 'Address should not include protocol (e.g.: "http://", "wss://").' | ||
| } | ||
|
|
||
| if (value.endsWith('/')) { |
There was a problem hiding this comment.
This is being added inside a check function (isValidHostAddress), that returns a boolean.
0dfc2f8 to
eaca57c
Compare
eaca57c to
1cf8691
Compare
|
Discussed externally to move the check and fix to the |
1cf8691 to
4220a37
Compare
src/stores/mainVehicle.ts
Outdated
| if (newAddress.endsWith('/')) { | ||
| newAddress = newAddress.slice(0, -1) | ||
| } | ||
|
|
There was a problem hiding this comment.
The place here is correct, but I don't believe it will work as you're only replacing the value of newAddress, which is a local variable, not the actual Ref. You probably want the following:
if (newAddress.endsWith('/')) {
globalAddress.value = newAddress.slice(0, -1)
}|
@ArturoManzoli I intend to release a beta4 tomorrow. Let me know if you want to try getting this one on it. |
cb16ec8 to
2255ee1
Compare
src/stores/mainVehicle.ts
Outdated
| if (cleanedAddress.endsWith('/')) { | ||
| cleanedAddress = cleanedAddress.slice(0, -1) | ||
| globalAddress.value = cleanedAddress | ||
| return |
There was a problem hiding this comment.
I believe this early return should be removed, otherwise the setDataLakeVariableData method in the bottom will never be caught.
Signed-off-by: Arturo Manzoli <[email protected]>
2255ee1 to
ece3913
Compare
Close #2201