Index: trunk/extensions/UploadWizard/resources/mw.FlickrChecker.js |
— | — | @@ -41,13 +41,15 @@ |
42 | 42 | if ( typeof data.photo != 'undefined' ) { |
43 | 43 | // The returned data.photo.license is just an ID that we use to look up the license name |
44 | 44 | var licenseName = mw.FlickrChecker.licenseList[data.photo.license]; |
45 | | - // Use the license name to retrieve the template values |
46 | | - var licenseValue = mw.FlickrChecker.licenseMaps[licenseName]; |
47 | | - // Set the license message to show the user. |
48 | | - if ( licenseValue == 'invalid' ) { |
49 | | - var licenseMessage = gM( 'mwe-upwiz-license-external-invalid', 'Flickr', licenseName ); |
50 | | - } else { |
51 | | - var licenseMessage = gM( 'mwe-upwiz-license-external', 'Flickr', licenseName ); |
| 45 | + if ( typeof licenseName != 'undefined' ) { |
| 46 | + // Use the license name to retrieve the template values |
| 47 | + var licenseValue = mw.FlickrChecker.licenseMaps[licenseName]; |
| 48 | + // Set the license message to show the user. |
| 49 | + if ( licenseValue == 'invalid' ) { |
| 50 | + var licenseMessage = gM( 'mwe-upwiz-license-external-invalid', 'Flickr', licenseName ); |
| 51 | + } else { |
| 52 | + var licenseMessage = gM( 'mwe-upwiz-license-external', 'Flickr', licenseName ); |
| 53 | + } |
52 | 54 | } |
53 | 55 | } |
54 | 56 | } |