mirror of
https://github.com/home-assistant/frontend.git
synced 2026-10-11 01:54:44 +01:00
* Migrate from Yarn to pnpm Switch the package manager to pnpm 11, keeping every resolved dependency version from yarn.lock. - Move resolutions to pnpm overrides and Yarn patches to patches/ - Enable supply-chain protection: 3 day minimum release age, trust policy that blocks provenance downgrades, and dependency build scripts denied by default - Declare dependencies that were imported but only available through Yarn's hoisting: zrender, @lezer/common, zxing-wasm, @babel/helper-compilation-targets, core-js-compat, @types/geojson - Look up pinned license overrides in pnpm's node_modules layout - Update CI, scripts, git hooks, Renovate, and documentation * Cache the pnpm store with node_modules in CI Jobs that restore the shared node_modules cache skip the install, so the pnpm store is empty there. The license file generation runs `pnpm licenses list`, which reads package metadata from the store and fails without it. * Point the demo e2e comment at the real test:e2e:demo script --------- Co-authored-by: Claude <noreply@anthropic.com>
61 lines
2.3 KiB
Diff
61 lines
2.3 KiB
Diff
diff --git a/modular/sortable.core.esm.js b/modular/sortable.core.esm.js
|
|
index 8b5e49b011713c8859c669069fbe85ce53974e1d..6a0afc92787157b8a31c38cc5f67dfa526090a00 100644
|
|
--- a/modular/sortable.core.esm.js
|
|
+++ b/modular/sortable.core.esm.js
|
|
@@ -1781,11 +1781,16 @@ Sortable.prototype = /** @lends Sortable.prototype */{
|
|
}
|
|
if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {
|
|
capture();
|
|
- if (elLastChild && elLastChild.nextSibling) {
|
|
- // the last draggable element is not the last node
|
|
- el.insertBefore(dragEl, elLastChild.nextSibling);
|
|
- } else {
|
|
- el.appendChild(dragEl);
|
|
+ try {
|
|
+ if (elLastChild && elLastChild.nextSibling) {
|
|
+ // the last draggable element is not the last node
|
|
+ el.insertBefore(dragEl, elLastChild.nextSibling);
|
|
+ } else {
|
|
+ el.appendChild(dragEl);
|
|
+ }
|
|
+ }
|
|
+ catch(err) {
|
|
+ return completed(false);
|
|
}
|
|
parentEl = el; // actualization
|
|
|
|
@@ -1802,7 +1807,12 @@ Sortable.prototype = /** @lends Sortable.prototype */{
|
|
targetRect = getRect(target);
|
|
if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {
|
|
capture();
|
|
- el.insertBefore(dragEl, firstChild);
|
|
+ try {
|
|
+ el.insertBefore(dragEl, firstChild);
|
|
+ }
|
|
+ catch(err) {
|
|
+ return completed(false);
|
|
+ }
|
|
parentEl = el; // actualization
|
|
|
|
changed();
|
|
@@ -1849,10 +1859,15 @@ Sortable.prototype = /** @lends Sortable.prototype */{
|
|
_silent = true;
|
|
setTimeout(_unsilent, 30);
|
|
capture();
|
|
- if (after && !nextSibling) {
|
|
- el.appendChild(dragEl);
|
|
- } else {
|
|
- target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
|
|
+ try {
|
|
+ if (after && !nextSibling) {
|
|
+ el.appendChild(dragEl);
|
|
+ } else {
|
|
+ target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
|
|
+ }
|
|
+ }
|
|
+ catch(err) {
|
|
+ return completed(false);
|
|
}
|
|
|
|
// Undo chrome's scroll adjustment (has no effect on other browsers)
|