From 7dca5295e1764f9a2286bc0b9a36422d736fb5f6 Mon Sep 17 00:00:00 2001 From: Suguru Inoue Date: Wed, 30 Apr 2025 17:21:06 +0200 Subject: [PATCH] fix(editor): Fix an unstable unit test case (no-changelog) (#14989) --- patches/element-plus@2.4.3.patch | 20 ++++++++++---------- pnpm-lock.yaml | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/patches/element-plus@2.4.3.patch b/patches/element-plus@2.4.3.patch index 70eb3ad10a..c8bd16f7ab 100644 --- a/patches/element-plus@2.4.3.patch +++ b/patches/element-plus@2.4.3.patch @@ -1,26 +1,26 @@ diff --git a/es/hooks/use-lockscreen/index.mjs b/es/hooks/use-lockscreen/index.mjs -index 482516a6c59f8dcf0caba62b7482f63f126c2280..ad3a62f956fe5672c318273aa69dfcf2576b3783 100644 +index 482516a6c59f8dcf0caba62b7482f63f126c2280..82a37f344bd650e9d514397b4531c0ff36487c70 100644 --- a/es/hooks/use-lockscreen/index.mjs +++ b/es/hooks/use-lockscreen/index.mjs -@@ -20,6 +20,8 @@ const useLockscreen = (trigger, options = {}) => { - let withoutHiddenClass = false; +@@ -21,6 +21,8 @@ const useLockscreen = (trigger, options = {}) => { let bodyWidth = "0"; const cleanup = () => { -+ // Cherry-pick from https://github.com/element-plus/element-plus/pull/18445 -+ if (typeof document === 'undefined') return setTimeout(() => { ++ // Cherry-pick from https://github.com/element-plus/element-plus/pull/18445 ++ if (typeof document === 'undefined') return; removeClass(document == null ? void 0 : document.body, hiddenCls.value); if (withoutHiddenClass && document) { + document.body.style.width = bodyWidth; diff --git a/lib/hooks/use-lockscreen/index.js b/lib/hooks/use-lockscreen/index.js -index ce7bd581a57cd0d7e834c42a954b48d148578ef5..42fcc50bc15a12ab8466a1294c5af2e65384d5ac 100644 +index ce7bd581a57cd0d7e834c42a954b48d148578ef5..496e4dc07bae546bea037cedb23ea0ee7b3a7955 100644 --- a/lib/hooks/use-lockscreen/index.js +++ b/lib/hooks/use-lockscreen/index.js -@@ -24,6 +24,8 @@ const useLockscreen = (trigger, options = {}) => { - let withoutHiddenClass = false; +@@ -25,6 +25,8 @@ const useLockscreen = (trigger, options = {}) => { let bodyWidth = "0"; const cleanup = () => { -+ // Cherry-pick from https://github.com/element-plus/element-plus/pull/18445 -+ if (typeof document === 'undefined') return setTimeout(() => { ++ // Cherry-pick from https://github.com/element-plus/element-plus/pull/18445 ++ if (typeof document === 'undefined') return; style.removeClass(document == null ? void 0 : document.body, hiddenCls.value); if (withoutHiddenClass && document) { + document.body.style.width = bodyWidth; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2711d4dd86..767e5b85ca 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -185,7 +185,7 @@ patchedDependencies: hash: a4b6d56db16fe5870646929938466d6a5c668435fd1551bed6a93fffb597ba42 path: patches/bull@4.16.4.patch element-plus@2.4.3: - hash: fe650d17e32d13a07f54411f2ee552a8faeae20d92ef5e5a23424d590ba4a382 + hash: 3bc4ea0a42ad52c6bbc3d06c12c2963d55b57d6b5b8d436e46e7fd8ff8c10661 path: patches/element-plus@2.4.3.patch eslint-plugin-n8n-local-rules: hash: e0fd59254ab02473c6940fa25fcc8102ebc7d371c015ec53333a43f48af33cc2 @@ -1672,7 +1672,7 @@ importers: version: 10.11.0(vue@3.5.13(typescript@5.8.2)) element-plus: specifier: catalog:frontend - version: 2.4.3(patch_hash=fe650d17e32d13a07f54411f2ee552a8faeae20d92ef5e5a23424d590ba4a382)(vue@3.5.13(typescript@5.8.2)) + version: 2.4.3(patch_hash=3bc4ea0a42ad52c6bbc3d06c12c2963d55b57d6b5b8d436e46e7fd8ff8c10661)(vue@3.5.13(typescript@5.8.2)) is-emoji-supported: specifier: ^0.0.5 version: 0.0.5 @@ -1916,7 +1916,7 @@ importers: version: 3.0.3 element-plus: specifier: catalog:frontend - version: 2.4.3(patch_hash=fe650d17e32d13a07f54411f2ee552a8faeae20d92ef5e5a23424d590ba4a382)(vue@3.5.13(typescript@5.8.2)) + version: 2.4.3(patch_hash=3bc4ea0a42ad52c6bbc3d06c12c2963d55b57d6b5b8d436e46e7fd8ff8c10661)(vue@3.5.13(typescript@5.8.2)) email-providers: specifier: ^2.0.1 version: 2.0.1 @@ -21592,7 +21592,7 @@ snapshots: electron-to-chromium@1.5.114: {} - element-plus@2.4.3(patch_hash=fe650d17e32d13a07f54411f2ee552a8faeae20d92ef5e5a23424d590ba4a382)(vue@3.5.13(typescript@5.8.2)): + element-plus@2.4.3(patch_hash=3bc4ea0a42ad52c6bbc3d06c12c2963d55b57d6b5b8d436e46e7fd8ff8c10661)(vue@3.5.13(typescript@5.8.2)): dependencies: '@ctrl/tinycolor': 3.6.0 '@element-plus/icons-vue': 2.3.1(vue@3.5.13(typescript@5.8.2))