Update jq-repeat to 2.1.0; fix editProfile update->slideDown race
jq-repeat 2.1.0 (release notes: https://github.com/wmantly/jq-repeat/releases/tag/v2.1.0) brings real fixes (throttled-update race conditions, sorted-list reverse() leaking elements, nested-scope isolation) and a few behavior changes. Audited every usage in this repo against the changelog before upgrading: - push()/unshift() now return the new array length -- every call site in this repo is a bare statement, none consume the return value. No risk. - __setPut/__setTake, jr-order-reverse, nested jq-repeat templates: not used anywhere in this repo (unlike proxy's companion PR, which needed the __setPut/__setTake fix). Real risk found and fixed: update() is now trailing-edge throttled (~50ms) even on the first call, not just rapid subsequent ones. profile.ejs's editUser()/editUserSeccess() call $.scope.editProfile .update()/renderProfile() (which itself calls update()) and immediately slideDown() the same element -- with the old synchronous behavior the form was already populated by then; with throttling it could briefly show stale/empty data. Deferred both slideUp/slideDown pairs by 60ms (past the throttle window), per the library's own migration guidance. Verified live (real bundled image + Playwright, logged in as admin): the edit form's fields show real data, not empty/stale, when checked right as the slide-open completes.
This commit is contained in:
+1
-1
@@ -31,7 +31,7 @@
|
||||
"express": "^5.2.1",
|
||||
"express-rate-limit": "^8.5.2",
|
||||
"extend": "^3.0.2",
|
||||
"jq-repeat": "^2.0.1",
|
||||
"jq-repeat": "^2.1.0",
|
||||
"jquery": "^3.7.1",
|
||||
"jsonwebtoken": "^9.0.3",
|
||||
"ldapts": "^8.1.2",
|
||||
|
||||
Reference in New Issue
Block a user