While fixing #610, an overzealous change was added to remove(file) that was not necessary. Ember-Data apparently will automatically remove the model from view when calling destroyRecord(), so there was no need to add additional handling in the .then() clause to remove this from view.
Fixes #620
Approach
Remove the .then() clause from the promise
How to Test
Checkout and run this branch locally, rebuild the dashboard
Login to the WholeTale Dashboard
Create a Tale, if you haven't already
Navigate to Run > Files > Home or Run > Files > Tale Workspace
Upload a few files (5 or so)
Remove the second to last file from the list
You should see that only the file that you chose to Remove disappears
Refresh the page
You should see the same list of files appear, and the file you just removed should now be missing
Problem
While fixing #610, an overzealous change was added to
remove(file)
that was not necessary. Ember-Data apparently will automatically remove the model from view when callingdestroyRecord()
, so there was no need to add additional handling in the.then()
clause to remove this from view.Fixes #620
Approach
Remove the
.then()
clause from the promiseHow to Test