You still have to convince me why we should return a promise here. The caller of showCustomViewer will always get the promise from line 755. Therefore the local method _doShow  does not have to return a promise, but it does always resolve before returning, i.e. as in 726 or in 750. the return merely lets the method exit to not execute the code that creates a new viewer because the image is already in view.