Skip to content
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

call plugin using URL params after page load #437

Merged
merged 1 commit into from
Sep 30, 2020
Merged

call plugin using URL params after page load #437

merged 1 commit into from
Sep 30, 2020

Conversation

yann300
Copy link
Contributor

@yann300 yann300 commented Sep 22, 2020

pluginCall can be used as an url parameter to call a plugin after page loads.

This will be mostly used now for loading a learneth tutorial from a link.

await appManager.activatePlugin(workspace)
appManager.activatePlugin(workspace).then(() => {
// If plugins are loaded from the URL params, we focus on the last one.
if (pluginLoader.current === 'queryParams' && Array.isArray(workspace) && workspace.length > 0) menuicons.select(workspace[workspace.length - 1])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Array.isArray(workspace) is already checked above with if

@@ -405,7 +405,21 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
// Set workspace after initial activation
if (Array.isArray(workspace)) {
try {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, if try-catch is still required as we don't have any await statement now

@yann300 yann300 merged commit 5a99121 into master Sep 30, 2020
yann300 pushed a commit that referenced this pull request Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants