ProxymanApp / Proxyman

Modern. Native. Delightful Web Debugging Proxy for macOS, iOS, and Android ⚡️
https://proxyman.io
5.34k stars 177 forks source link

Error: sharedState is not defined [windows version] #2026

Open hao1032 opened 1 month ago

hao1032 commented 1 month ago

Description

Using sharedState.data = "My-Data" in the scripting example throws an error.

Steps to Reproduce

Using sharedState.data = "My-Data" results in an error. image

Using sharedState = {data: "My-Data"} does not produce an error. image

Environment

kics223w1 commented 1 month ago

Hi @hao1032

The sharedState in the feature Scripting Environment Variables is not yet implemented in Windows. So the application throws the error in the first case.

In the second case, you define the global variable in the script so everything works fine.

hao1032 commented 1 month ago

Sure, the example provided for the Windows version is actually not usable. If necessary, I hope it can be modified.