mirror of
https://github.com/murdos/musicbrainz-userscripts
synced 2024-12-13 20:02:27 +00:00
MA importer: fix up regexp, year detection
This commit is contained in:
parent
ea0d9d61ca
commit
4eb6d1bc59
1 changed files with 1 additions and 2 deletions
|
@ -23,8 +23,7 @@ $(document).ready(function() {
|
|||
});
|
||||
|
||||
function setreleasedate(release, datestring) {
|
||||
var patt = new RegExp('^d{4}$');
|
||||
if (patt.exec(datestring)) {
|
||||
if (/^\d{4}$/.exec(datestring)) {
|
||||
release.year = datestring;
|
||||
} else if (datestring.indexOf(',') != -1) {
|
||||
var commaindex = datestring.indexOf(',');
|
||||
|
|
Loading…
Reference in a new issue