Upfront editor doesn't work on mapped domain with HTTPS

When mapped domain has SSL and you start UF editor it will not load and will show console errors that are not showing when original domain is used:

When original domain option is set in DM it will work fine, so it only happens when on mapped domain.

Forcing admin ssl in wp-config should help with replicating the issue.
define('FORCE_SSL_ADMIN', true);

On storegear network you can see the issue on santamonicanative subsite.

If domain mapping had condition that checked for "$_GET['editmode'] == 'true'" and then forced it to not use the mapped domain for editing, would be working for me and safer.

I have modified the following to make it work:
classes/Domainmap/Module/Mapping.php

function is_excluded_by_id( $post_id ){
if($_GET['editmode']) { // ben start

return apply_filters("dm_is_excluded_by_url", true);
} // ben end
if( is_null( $post_id ) ) return apply_filters("dm_is_excluded_by_id", false);
return apply_filters("dm_is_excluded_by_url", in_array( $post_id, self::get_excluded_pages( true ) ), $post_id);
}