-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow function to programmatically return default values #6
Comments
It could very well be that I'm missing something, but it appears that you can already specify a function. I haven't run into obvious issues with freezing, perhaps because functions are just JS objects. For example (as a partial fix for rugk/offline-qr-code#201): davidfloyd91/offline-qr-code@6b63a5f There are still issues with the above, but setting a function as a value in the |
And now I'm getting these warnings. Figured it couldn't be that simple:
|
Okay, anyway, that surprises me… Or actually, not. Ah, obviously, you just run the function and use the return value… fine. 😄 Anyway, your change from davidfloyd91/offline-qr-code@6b63a5f did not made it into the PR branch, as it seems, so I cannot review it yet there. |
Ah and that warning seems unrelated… it's actually about something else, possibly. (Did you check whether it appears before?) Also, it's just a warning… |
Okay I see, had a feeling I wasn't understanding you fully. If you think this solution is too expensive or otherwise not workable let me know. I'll play around with implementing something more like what you're describing.
I saw those warnings once or twice when I almost certainly didn't cause them (I hadn't touched
I'll leave a comment at rugk/offline-qr-code#201 |
BTW, that feature for OfflineQR has been merged, but if you want, feel free to continue this issue here. You can take it as a refactoring task (i.e. behaviour now works in OfflineQR and should stay like this). So this issue here is mostly about "optimizing" the function execution, i.e. making it only run |
Sounds good! |
Possibly required for rugk/offline-qr-code#201...
TODO:
The text was updated successfully, but these errors were encountered: