Skip to content
Snippets Groups Projects
Commit ff837aa9 authored by Patrick Jentsch's avatar Patrick Jentsch
Browse files

Don't use extra variable for one-time use.

parent d30980bf
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@ class CorpusList extends List {
_update(patch) {
var item, operation, pathArray, valueName;
var item, operation, pathArray;
for (operation of patch) {
/* "/corpusId/valueName" -> ["corpusId", "valueName"] */
......@@ -33,8 +33,7 @@ class CorpusList extends List {
break;
case "replace":
item = this.get("id", pathArray[0])[0];
valueName = pathArray[1];
switch(valueName) {
switch(pathArray[1]) {
case "description":
item.values({"description": operation.value});
break;
......
......@@ -17,7 +17,7 @@ class JobList extends List {
_update(patch) {
var item, jobStatusElement, newStatusColor, operation, pathArray, status,
statusColor, valueName;
statusColor;
for (operation of patch) {
/* "/jobId/valueName" -> ["jobId", "valueName"] */
......@@ -34,8 +34,7 @@ class JobList extends List {
break;
case "replace":
item = this.get("id", pathArray[0])[0];
valueName = pathArray[1];
switch(valueName) {
switch(pathArray[1]) {
case "description":
item.values({"description": operation.value});
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment