Use different names for variable and parameter

Using the same name means from that point the name doesn't refer to the
original parameter, which might be confusing when reading the method.
This commit is contained in:
Javi Martín
2019-06-30 02:13:51 +02:00
parent c55a1a9faf
commit 879cc2571f
2 changed files with 8 additions and 8 deletions

View File

@@ -28,10 +28,10 @@ App.Documentable =
formData: null
add: (e, data) ->
data = App.Documentable.buildFileUploadData(e, data)
App.Documentable.clearProgressBar(data)
App.Documentable.setProgressBar(data, "uploading")
data.submit()
upload_data = App.Documentable.buildFileUploadData(e, data)
App.Documentable.clearProgressBar(upload_data)
App.Documentable.setProgressBar(upload_data, "uploading")
upload_data.submit()
change: (e, data) ->
data.files.forEach (file) ->

View File

@@ -29,10 +29,10 @@ App.Imageable =
formData: null
add: (e, data) ->
data = App.Imageable.buildFileUploadData(e, data)
App.Imageable.clearProgressBar(data)
App.Imageable.setProgressBar(data, "uploading")
data.submit()
upload_data = App.Imageable.buildFileUploadData(e, data)
App.Imageable.clearProgressBar(upload_data)
App.Imageable.setProgressBar(upload_data, "uploading")
upload_data.submit()
change: (e, data) ->
data.files.forEach (file) ->