I have an object Checkout that I invoke from external script,
some times when I invoke it, I get erorr masage Checkout is not defined because I think this object loaded before external script.
Is there a way to fix this error
external script
<script src="https://example.com/checkout.js"></script>
my script
$( document ).ready(function() {
Checkout.dosomething();
});