Skip to content

Commit caae066

Browse files
Make sure no client side errors are thrown on Appearance > Customize pages.
1 parent 6dbbe0b commit caae066

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/scripts/admin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
bulk_compress_item(items, 0)
138138
}
139139

140-
if (adminpage === "upload-php") {
140+
if (typeof adminpage !== "undefined" && adminpage === "upload-php") {
141141
if (typeof jQuery.fn.on === "function") {
142142
jQuery('table').on('click', 'button.tiny-compress', compress_image)
143143
} else {
@@ -154,7 +154,7 @@
154154
jQuery('<option>').val('tiny_bulk_compress').text(tinyCompress.L10nBulkAction).appendTo('select[name="action2"]')
155155
}
156156

157-
if (adminpage === "options-media-php") {
157+
if (typeof adminpage !== "undefined" && adminpage === "options-media-php") {
158158
jQuery('#tiny-compress-status').load(ajaxurl + '?action=tiny_compress_status')
159159
jQuery('#tiny-compress-savings').load(ajaxurl + '?action=tiny_compress_savings')
160160

0 commit comments

Comments
 (0)