fix comparation onReady typeof function