Without this fix, you couldn't use the same treaty path object twice to execute requests. It would work the first time, but if tried to use it again, the request method would be lost.
This is because there was a mutation happening to the array used to contain the path information for the request, when really the mutation shouldn't be happening. A copy of the paths array is now created before extracting the method and construction the path string.
… requests
See: https://discord.com/channels/1044804142461362206/1222687737098797116
Without this fix, you couldn't use the same treaty path object twice to execute requests. It would work the first time, but if tried to use it again, the request method would be lost.
This is because there was a mutation happening to the array used to contain the path information for the request, when really the mutation shouldn't be happening. A copy of the paths array is now created before extracting the method and construction the path string.