Skip to content

Commit

Permalink
Hotfix: Fix stems downloads on mobile web (#3382)
Browse files Browse the repository at this point in the history
  • Loading branch information
rickyrombo committed May 18, 2023
1 parent ff8727d commit f143708
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
17 changes: 17 additions & 0 deletions apps/audius-client/packages/web/patches/react-lottie+1.2.3.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/node_modules/react-lottie/dist/index.js b/node_modules/react-lottie/dist/index.js
index b9015a6..8d37a73 100644
--- a/node_modules/react-lottie/dist/index.js
+++ b/node_modules/react-lottie/dist/index.js
@@ -100,8 +100,10 @@ var Lottie = function (_React$Component) {
value: function componentWillUpdate(nextProps /* , nextState */) {
/* Recreate the animation handle if the data is changed */
if (this.options.animationData !== nextProps.options.animationData) {
- this.deRegisterEvents(this.props.eventListeners);
- this.destroy();
+ if (this.anim !== null) {
+ this.deRegisterEvents(this.props.eventListeners);
+ this.destroy();
+ }
this.options = (0, _extends3.default)({}, this.options, nextProps.options);
this.anim = _lottieWeb2.default.loadAnimation(this.options);
this.registerEvents(nextProps.eventListeners);
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ class TrackPageProvider extends Component<
// Go to 404 if the track id isn't parsed correctly or if should redirect
if (!params || (params.trackId && shouldRedirectTrack(params.trackId))) {
console.log('not found 1')
this.props.goToRoute(NOT_FOUND_PAGE)
if (this.props.pathname !== '/signup')
this.props.goToRoute(NOT_FOUND_PAGE)
return
}

Expand Down

0 comments on commit f143708

Please sign in to comment.