Commit 1a5234e
committed
fix(realtime): handle null values in postgres changes filter comparison
the server may return null for optional fields (schema, table, filter)
while the client has undefined. strict equality comparison fails when
comparing null === undefined, causing false mismatch errors.
this normalizes both values before comparison to handle the null/undefined
discrepancy that occurs during json serialization.
closes #19171 parent 2596a09 commit 1a5234eCopy full SHA for 1a5234e
File tree
Expand file treeCollapse file tree
2 files changed
+88
-3
lines changedOpen diff view settings
Filter options
- packages/core/realtime-js
- src
- test
Expand file treeCollapse file tree
2 files changed
+88
-3
lines changedOpen diff view settings
Collapse file
packages/core/realtime-js/src/RealtimeChannel.ts
Copy file name to clipboardExpand all lines: packages/core/realtime-js/src/RealtimeChannel.ts+17-3Lines changed: 17 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
327 | 327 | |
328 | 328 | |
329 | 329 | |
330 | | - |
331 | | - |
332 | | - |
| 330 | + |
| 331 | + |
| 332 | + |
333 | 333 | |
334 | 334 | |
335 | 335 | |
| ||
949 | 949 | |
950 | 950 | |
951 | 951 | |
| 952 | + |
| 953 | + |
| 954 | + |
| 955 | + |
| 956 | + |
| 957 | + |
| 958 | + |
| 959 | + |
| 960 | + |
| 961 | + |
| 962 | + |
| 963 | + |
| 964 | + |
| 965 | + |
952 | 966 | |
953 | 967 | |
954 | 968 | |
|
Collapse file
packages/core/realtime-js/test/RealtimeChannel.postgres.test.ts
Copy file name to clipboardExpand all lines: packages/core/realtime-js/test/RealtimeChannel.postgres.test.ts+71Lines changed: 71 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
247 | 247 | |
248 | 248 | |
249 | 249 | |
| 250 | + |
| 251 | + |
| 252 | + |
| 253 | + |
| 254 | + |
| 255 | + |
| 256 | + |
| 257 | + |
| 258 | + |
| 259 | + |
| 260 | + |
| 261 | + |
| 262 | + |
| 263 | + |
| 264 | + |
| 265 | + |
| 266 | + |
| 267 | + |
| 268 | + |
| 269 | + |
| 270 | + |
| 271 | + |
| 272 | + |
| 273 | + |
| 274 | + |
| 275 | + |
| 276 | + |
| 277 | + |
| 278 | + |
| 279 | + |
| 280 | + |
| 281 | + |
| 282 | + |
| 283 | + |
| 284 | + |
| 285 | + |
| 286 | + |
| 287 | + |
| 288 | + |
| 289 | + |
| 290 | + |
| 291 | + |
| 292 | + |
| 293 | + |
| 294 | + |
| 295 | + |
| 296 | + |
| 297 | + |
| 298 | + |
| 299 | + |
| 300 | + |
| 301 | + |
| 302 | + |
| 303 | + |
| 304 | + |
| 305 | + |
| 306 | + |
| 307 | + |
| 308 | + |
| 309 | + |
| 310 | + |
| 311 | + |
| 312 | + |
| 313 | + |
| 314 | + |
| 315 | + |
| 316 | + |
| 317 | + |
| 318 | + |
| 319 | + |
| 320 | + |
250 | 321 | |
251 | 322 | |
252 | 323 | |
|
0 commit comments