Index: trunk/extensions/MwEmbedSupport/MwEmbedModules/MediaWikiSupport/resources/mw.MediaWikiPlayerSupport.js |
— | — | @@ -145,11 +145,14 @@ |
146 | 146 | $author.find('br').remove(); |
147 | 147 | |
148 | 148 | // Update link to be absolute per page url context: |
149 | | - var authUrl = $author.find('a').attr('href'); |
150 | | - authUrl = mw.absoluteUrl( authUrl, articleUrl ); |
151 | | - $author.find('a').attr('href', |
152 | | - authUrl |
153 | | - ) |
| 149 | + var $links = $author.find('a'); |
| 150 | + if( $links.length ) { |
| 151 | + var authUrl = $author.find('a').attr('href'); |
| 152 | + authUrl = mw.absoluteUrl( authUrl, articleUrl ); |
| 153 | + $author.find('a').attr('href', |
| 154 | + authUrl |
| 155 | + ) |
| 156 | + } |
154 | 157 | $creditLine.append( $( '<br />' ), |
155 | 158 | gM('mwe-embedplayer-credit-author', $author.html() ) |
156 | 159 | ) |
— | — | @@ -263,4 +266,4 @@ |
264 | 267 | }); |
265 | 268 | }; |
266 | 269 | |
267 | | -} )( window.mediaWiki, window.jQuery ); |
\ No newline at end of file |
| 270 | +} )( window.mediaWiki, window.jQuery ); |