Skip to content

fix: replace premium GSAP SplitText with split-type, fix globe init race condition#8

Open
pro-utkarshM wants to merge 1 commit intoHackerResidency:mainfrom
pro-utkarshM:main
Open

fix: replace premium GSAP SplitText with split-type, fix globe init race condition#8
pro-utkarshM wants to merge 1 commit intoHackerResidency:mainfrom
pro-utkarshM:main

Conversation

@pro-utkarshM
Copy link

Description

Problem

The website was crashing with client-side exceptions, most notably:

Cannot read properties of null (reading 'enable')

The codebase also relied on gsap/SplitText, a paid GSAP Club plugin, causing licensing and build issues.

image (1)

Changes

1. Replace GSAP SplitText with split-type

File: src/app/home/animated-story-text.tsx

  • Removed premium gsap/SplitText dependency
  • Added free and open-source split-type
  • Updated animation logic to match the split-type API
  • Preserved existing animation behavior

2. Fix Globe WebGL initialization race condition

File: src/components/globe.tsx

  • Added isMounted guard to ensure component is fully mounted before WebGL init
  • Deferred globe creation using requestAnimationFrame to ensure correct canvas dimensions
  • Validated WebGL context before initialization
  • Wrapped globe creation in try/catch for graceful error handling

Files Changed

File Description
package.json Added split-type dependency
pnpm-lock.yaml Updated lockfile
src/app/home/animated-story-text.tsx Replaced SplitText with split-type
src/components/globe.tsx Fixed WebGL initialization race condition

Testing

  • pnpm build passes
  • All pages render without errors
  • Text animations work correctly
  • Globe renders in WebGL-supported browsers
  • Graceful fallback when WebGL is unavailable

@vercel
Copy link

vercel bot commented Jan 22, 2026

@pro-utkarshM is attempting to deploy a commit to the Saasify Team on Vercel.

A member of the Team first needs to authorize it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant