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

fix: pass previewUrlCallback function to the global scope #270

Merged
merged 2 commits into from
Jul 23, 2021

Conversation

nd0ut
Copy link
Member

@nd0ut nd0ut commented Jul 20, 2021

No description provided.

src/uploader.js Outdated
@@ -80,6 +84,7 @@ const useWidget = (
if (locale) delete window.UPLOADCARE_LOCALE
if (localePluralize) delete window.UPLOADCARE_LOCALE_PLURALIZE
if (localeTranslations) delete window.UPLOADCARE_LOCALE_TRANSLATIONS
if (previewUrlCallback) delete window.UPLOADCARE_PREVIEW_URL_CALLBACK
}
}, [locale, localeTranslations, localePluralize])

Choose a reason for hiding this comment

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

use hook useCallback for set function in deps.
previewUrlCallback

Copy link
Member Author

Choose a reason for hiding this comment

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

😨 fixed

@nd0ut nd0ut requested a review from FilippovAM July 21, 2021 10:13
@nd0ut nd0ut merged commit 32d778c into master Jul 23, 2021
@nd0ut nd0ut deleted the fix/preview-url-callback branch July 23, 2021 11:42
@nd0ut
Copy link
Member Author

nd0ut commented Jul 23, 2021

@shipjs prepare

@github-actions
Copy link
Contributor

@nd0ut shipjs prepare fail

@nd0ut
Copy link
Member Author

nd0ut commented Jul 23, 2021

@shipjs prepare

@github-actions
Copy link
Contributor

@nd0ut shipjs prepare fail

@nd0ut
Copy link
Member Author

nd0ut commented Jul 23, 2021

@shipjs prepare

@github-actions
Copy link
Contributor

@nd0ut shipjs prepare done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants