Skip the stopwatch menu link update for users without one

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-03 20:06:31 -05:00
1 parent c5d3b2d959
commit 56081f8a01
1 file changed
+2
+2
View File
@@ -110,6 +110,8 @@ window.initStopwatch = function(config){
},
setProjectId: function(projectId){
var a = $('a#stopwatch-menu');
// Users who can't log time have no stopwatch menu link
if (!a.length) return;
a.attr('href', a.attr('href').replace(/\/new.*$/, '/new?project_id='+projectId));
}
});