diff --git a/package-mixins.js b/package-mixins.js index 263f3a9..291fd29 100644 --- a/package-mixins.js +++ b/package-mixins.js @@ -3,6 +3,10 @@ var extend = require("extend"); module.exports = (NativeCodePush) => { var remote = { download: function download() { + if (!this.downloadUrl) { + return Promise.reject(new Error("Cannot download an update without a download url")); + } + // Use the downloaded package info. Native code will save the package info // so that the client knows what the current package version is. return NativeCodePush.downloadUpdate(this)