Skip to content

Commit 5345459

Browse files
author
Shane Osbourne
committed
fix tests
1 parent fbe3e9d commit 5345459

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/browser-sync/lib/types.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,14 @@ export function toChangeEvent(evt: FileChangedEvent): FileChangedEvent {
136136
/// Browser Reload Event
137137

138138
const browserReloadEvent = z.object({
139-
files: z.array(z.string())
139+
files: z.array(z.union([z.string(), fileChangedEventParser]))
140140
});
141141

142142
export type ReloadEvent = z.infer<typeof browserReloadEvent>;
143143

144144
export function toReloadEvent(reload: ReloadEvent): ReloadEvent {
145-
return browserReloadEvent.parse(reload);
145+
browserReloadEvent.parse(reload);
146+
return reload;
146147
}
147148

148149
/// Inject File info

0 commit comments

Comments
 (0)