Why did this code stopped working?

I copied this code to block all traffic not coming from México and now without a change it stopped working. Any Ideas?

import { fetch } from ‘wix-fetch’ ;

const API_KEY = “d35FgsT6CaRLghitHghO” ;

$w . onReady ( function () {
fetch ( https:extreme-ip-lookup.com/json/?key= ${ API_KEY } , {
method : ‘get’
})
. then (( httpResponse ) => {
if ( httpResponse.ok ) {
return httpResponse . json ();
}
})

    . then (( json ) => { 
        **const**  loc  =  json.countryCode ; 
        **if** ( loc  !==  'MX' ) { 
            wixLocation . to ( '/not-mexico' ); 
        } 

Thanks in Advance