Web IDE: Fix the console error that happens when discarding a newly added/uploaded file.
What does this MR do?
Fix console error on discarding new files in Web IDE
In Web IDE, when you "discard all changes" for any newly added
or uploaded file, an error occurs. This is because the Web IDE tries to
close that file, but the
closeFile action is called with the wrong type
This partly fixes the problem in #27244 (closed), so we'd be one step closer to fixing the actual problem.