Skip to content

Fix: Only execute code if wp.media exists#3

Open
zcuric wants to merge 1 commit intohlashbrooke:masterfrom
zcuric:fix-missing-wp.media
Open

Fix: Only execute code if wp.media exists#3
zcuric wants to merge 1 commit intohlashbrooke:masterfrom
zcuric:fix-missing-wp.media

Conversation

@zcuric
Copy link
Copy Markdown

@zcuric zcuric commented Dec 30, 2018

This PR:

  • Adds a check if wp.media exists so the script doesn't break if there is none and prevents code from executing.

To reproduce this bug, use ACF and try to add new field group. In the console you can see the error:
image

@zcuric zcuric force-pushed the fix-missing-wp.media branch from 85d2370 to e6f83d4 Compare December 30, 2018 19:42
@zcuric zcuric force-pushed the fix-missing-wp.media branch from e6f83d4 to c5b22b2 Compare December 30, 2018 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant