Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.
JavaScript apple-watchbodyweightdockerfitnessfitness-trackergymhealthiosmcpnodejspasskeysprogressive-web-applicationspwareactself-hostedself-hostingvitewebauthnweightliftingworkout-tracker
fix: reuse the localized empty-exercise message
Space-Hermes659b00598361
diff --git a/frontend/src/lib/session-routines.js b/frontend/src/lib/session-routines.jsindex 46fa6398b..79e3e54f9 100644--- a/frontend/src/lib/session-routines.js+++ b/frontend/src/lib/session-routines.js@@ -95,7 +95,7 @@ function copiedEntry(entry) {export function routineFromSession(session, name = session?.name) {const ex = groupIds(sessionEntries(session).filter(entry => entry?.sets?.length).map(copiedEntry))- if (!ex.length) throw new Error('This session has no exercises to save.')+ if (!ex.length) throw new Error('no exercises')return { id: uid(), name: String(name || 'Workout').trim() || 'Workout', ex }}diff --git a/frontend/src/lib/session-routines.test.js b/frontend/src/lib/session-routines.test.jsindex 2aa04007b..8818a9509 100644--- a/frontend/src/lib/session-routines.test.js+++ b/frontend/src/lib/session-routines.test.js@@ -118,7 +118,7 @@ describe('routineFromSession', () => {})it('rejects a saved session with no exercise setup', () => {- expect(() => routineFromSession({ name: 'Empty', entries: [] })).toThrow('This session has no exercises to save.')+ expect(() => routineFromSession({ name: 'Empty', entries: [] })).toThrow('no exercises')})})