Commit e3c9d79
authored
refactor: simplify evaluation context updates for before hooks (#1257)
## This PR
- Remove redundant loop for updating the before hook contexts
- Add simple test case to make sure the same object reference is being
updated
### Related Issues
<!-- add here the GitHub issue that this PR resolves if applicable -->
#1236
### Notes
The accumulated evaluation context object is shared with all the hooks
(same object reference). This makes the inner for loop for updating the
contexts redundant
### How to test
```npm run test```
---------
Signed-off-by: Marko Mlakar <markomlakar2@gmail.com>
Signed-off-by: MarkoMlakar <marko.mlakar@dynatrace.com>1 parent 40d6d73 commit e3c9d79
File tree
2 files changed
+63
-4
lines changed- packages/server
- src/client/internal
- test
2 files changed
+63
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
| 347 | + | |
351 | 348 | | |
352 | 349 | | |
353 | 350 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
314 | 376 | | |
315 | 377 | | |
316 | 378 | | |
| |||
0 commit comments