fix(puter.js): give assignment to defaultGUIOrigin precedence#2540
Draft
KernelDeimos wants to merge 1 commit intomainfrom
Draft
fix(puter.js): give assignment to defaultGUIOrigin precedence#2540KernelDeimos wants to merge 1 commit intomainfrom
KernelDeimos wants to merge 1 commit intomainfrom
Conversation
This change gives precedence to the assignment of `defaultGUIOrigin` over global values typically set by the bundler. This is helpful when testing puter.js behavior in third-party sites with a locally running instance of Puter, where this value can be incorrect. In the following code snippet, the behavior before this change is the output "default gui origin? https://puter.com". After this change, the output is "default gui origin? https://example.com" as expected. ```javascript puter.defaultGUIOrigin = 'https://example.com'; console.log('default gui origin?', puter.defaultGUIOrigin); ```
Contributor
Author
|
Set this to draft to avoid confusion. This is an idea for a change we could make to make testing easier, and is a "fix" because I think the current behavior would be unexpected, but it is not a fix for a bug related to anything currently being investigated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change gives precedence to the assignment of
defaultGUIOriginover global values typically set by the bundler. This is helpful when testing puter.js behavior in third-party sites with a locally running instance of Puter, where this value can be incorrect.In the following code snippet, the behavior before this change is the output "default gui origin? https://puter.com". After this change, the output is "default gui origin? https://example.com" as expected.