Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Commit

Permalink
make code easier to understand using destructuring
Browse files Browse the repository at this point in the history
  • Loading branch information
myakura committed Jul 6, 2016
1 parent 47262ad commit fa0a5ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dicentra_version.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ const getConfigURL = url => {
const getWebKitVersion = response => {
const reVersions = /MAJOR_VERSION = (\d{3});\nMINOR_VERSION = (\d{1,2});/
if (reVersions.test(response)) {
const versionArray = reVersions.exec(response).slice(1)
return `${versionArray[0]}.${('0' + versionArray[1]).slice(-2)}`
const [_, major, minor] = reVersions.exec(response)
return `${major}.${('0' + minor).slice(-2)}`
}
else {
throw new Error('Cannot obtain version from the response.')
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Dicentra",
"version": "0.8.10",
"version": "0.8.11",
"description": "enhances WebKit changeset page.",
"manifest_version": 2,

Expand Down

0 comments on commit fa0a5ab

Please sign in to comment.