Made onPublish() an empty function is async=true and onPublish is undefined