fix: error on ipad (safari/chrome) where key could be null and throw an error