Skip to content

Commit a5a0aaa

Browse files
kevmo314claude
andcommitted
chore: sync package-lock.json and fix TypeScript errors
- Updated package-lock.json through npm install - Fixed missing safeLogEvent function in forStreamer function scope 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 8c7f87c commit a5a0aaa

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

api/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/src/index.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,18 @@ export function forPullKey(pullKey: string) {
169169
/** Creates a listener source for a streamer's public data. */
170170
export function forStreamer(provider: "twitch", userId: string) {
171171
const db = getDatabase(getApp());
172+
const analytics = getAnalytics(getApp());
172173
const reference = child(ref(db, "streamers"), `${provider}:${userId}`);
174+
const safeLogEvent = (eventName: string, eventParams?: any) => {
175+
isSupported()
176+
.then((supported) => {
177+
if (supported) {
178+
logEvent(analytics, eventName, eventParams);
179+
}
180+
})
181+
.catch(() => {});
182+
};
183+
173184
return {
174185
/** If the public location is hidden (eg streamer is offline), null is passed. */
175186
addLocationListener(callback: (location: Location | null) => void) {

0 commit comments

Comments
 (0)