-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Prevent registering RealtimePlugin if it is already registered
The flagship app already register the RealtimePlugin so the SearchEngine would try to register it a second time We assume the consuming app should be responsible to do the registration so the solution would be to remove it from the SearchEngine initialization But in order to ensure backward compatibility, we chose to keep the registration here but protected behind a check so the SearchEngine would register it only if not already registered
- Loading branch information
Showing
3 changed files
with
6 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/cozy-dataproxy-lib/src/search/@types/cozy-realtime.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
declare module 'cozy-realtime' { | ||
export const RealtimePlugin = (): null => null | ||
RealtimePlugin.pluginName = 'realtime' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters