From 68ce30760f42b519b41047302dd8bc3648cfa7ac Mon Sep 17 00:00:00 2001 From: priethor <27339341+priethor@users.noreply.github.com> Date: Wed, 23 Apr 2025 17:33:43 +0200 Subject: [PATCH] Update the acfL10n object to ensure it's available globally --- assets/src/js/_acf.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/assets/src/js/_acf.js b/assets/src/js/_acf.js index f154c7a8..cf437c0c 100644 --- a/assets/src/js/_acf.js +++ b/assets/src/js/_acf.js @@ -673,9 +673,8 @@ * @return string Translated text. */ - if ( window.acfL10n == undefined ) { - acfL10n = {}; - } + // Make sure a global acfL10n object exists to prevent errors in other scopes + window.acfL10n = window.acfL10n || {}; acf.__ = function ( text ) { return acfL10n[ text ] || text;