I don't think checking the visibility of _$currentCustomViewer is necessary here. In addition, this additionalycheck will give me incorrect logic that this function call is intended. What this function call want is whether we're currently using the custom viewer or not, and is not whether we're actually rendering with the current custom viewer.