Skip to content
This repository has been archived by the owner on Jan 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #147 from SlexAxton/fix-link-parsing
Browse files Browse the repository at this point in the history
Fix Incorrect "Link" parsing
  • Loading branch information
mde committed May 21, 2014
2 parents 37ca330 + fe5cde1 commit 661a641
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/date.js
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,15 @@
throw new Error('Error with Link ' + arr[1] + '. Cannot create link of a preexisted zone.');
}
//Create the link.
_this.zones[arr[1]] = +arr[0];
//Links are saved as strings that are the keys
//of their referenced values.
//Ex: "US/Central": "America/Chicago"
if (isNaN(arr[0])) {
_this.zones[arr[1]] = arr[0];
}
else {
_this.zones[arr[1]] = parseInt(arr[0], 10);
}
break;
}
}
Expand Down

0 comments on commit 661a641

Please sign in to comment.