rusackas commented on PR #36760:
URL: https://github.com/apache/superset/pull/36760#issuecomment-3683187537
Regarding bito-code-review's suggestion about the `return;` on line 124 in
`persistSqlLabStateEnhancer.ts`:
**This `return;` is intentional and was present in the original JavaScript
code.** It's not a bug introduced by this TypeScript migration.
The logic flow is:
1. The `return;` is inside the `paths.forEach(path => { ... })` callback,
NOT the slicer function itself
2. When `SqllabBackendPersistence` is enabled, the code:
- Builds `subset.sqlLab` with only unsaved data (if any exists)
- Returns early from the forEach callback to **skip** the old
localStorage persistence logic (lines 126-150)
3. The size calculation (lines 153-159) still runs after the forEach
completes
The `return;` prevents the non-backend-persistence code path from executing
when backend persistence is enabled - this is the correct and intended
behavior. The size calculation is **not** affected because it's outside the
forEach loop.
No changes needed here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]