Skip to content

Commit

Permalink
Fix: fpsLimit addition to local storage on upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
amasin76 committed Oct 17, 2023
1 parent fe84737 commit 7f5577b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pages/content/userStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const userStyle = () => {
}

// Set the fps limit
options.fpsLimit = particlesSettings.fpsLimit;
options.fpsLimit = particlesSettings?.fpsLimit || 30;

await tsParticles.load("tsparticles", options);
})();
Expand Down
2 changes: 1 addition & 1 deletion src/pages/options/components/userStyle/Particles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const Particles: React.FC = () => {
const { particlesEnabled, presetsParticles, selectedPresetParticles, particlesSettings } =
useStorage(userStyleStorage);
const [selectedPreset, setSelectedPreset] = useState<string | null>(selectedPresetParticles);
const [fpsLimit, setFpsLimit] = useState<number>(particlesSettings.fpsLimit);
const [fpsLimit, setFpsLimit] = useState<number>(particlesSettings?.fpsLimit || 30);

const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const isEnabled = e.target.checked;
Expand Down

0 comments on commit 7f5577b

Please sign in to comment.