Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions assets/src/js/_acf.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outside the scope of this PR, but we should probably add some checks on coding style outside PHP files, e.g. to create a consistent way for commenting etc (https://github.com/WordPress/secure-custom-fields/pull/118/files#diff-2c39fc5eb9675f3ca4efecbc4a219c3c560c52ad26d42d45217ad878755a59dfL852 - note the ending stop symbol)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good catch, thanks for noticing 💯

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not the only inconsistency, don't worry!

window.acfL10n = window.acfL10n || {};

acf.__ = function ( text ) {
return acfL10n[ text ] || text;
Expand Down
Loading