fix(media): create should return null if plugin is not available

This commit is contained in:
Ibby Hadeed 2017-05-17 07:21:42 -04:00
parent e5aff0f5f0
commit d68618f878

View File

@ -287,7 +287,7 @@ export class MediaPlugin extends IonicNativePlugin {
* @param [onError] {MediaErrorCallback} A callback function is be invoked if an error occurs.
* @return {MediaObject}
*/
@CordovaCheck()
@CordovaCheck({ sync: true })
create(src: string,
onStatusUpdate?: MediaStatusUpdateCallback,
onSuccess?: Function,