Skip to content

Commit

Permalink
Improved check to prevent JS error in WP media library
Browse files Browse the repository at this point in the history
  • Loading branch information
barrykooij committed Feb 2, 2015
1 parent 52f3847 commit 48d67c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion assets/js/admin/woocommerce_admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ jQuery( function ( $ ) {
$( 'table.attributes-table tbody tr:nth-child(odd)' ).addClass( 'alternate' );

// Generate QR Code
if ( typeof woocommerce_admin.qrcode_key !== 'undefined' ) {
if ( typeof woocommerce_admin !== 'undefined' && typeof woocommerce_admin.qrcode_key !== 'undefined' ) {
$( '#qrcode_small' ).qrcode({
text: woocommerce_admin.qrcode_key,
width: 90,
Expand Down
2 changes: 1 addition & 1 deletion assets/js/admin/woocommerce_admin.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 48d67c5

Please sign in to comment.