From 09a522972ba1132a2050a01b2312e891523f3e66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=81=93=E7=8E=84?= Date: Wed, 18 Nov 2020 20:32:27 +0800 Subject: [PATCH] fix with cordova v9 --- scripts/100-prepare-admob-angular.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/100-prepare-admob-angular.js b/scripts/100-prepare-admob-angular.js index 965ee30..46fcdef 100644 --- a/scripts/100-prepare-admob-angular.js +++ b/scripts/100-prepare-admob-angular.js @@ -4,7 +4,7 @@ var fs = require('fs'), path = require('path'); module.exports = function (context) { - var deferred = new context.requireCordovaModule('q').defer(), + var deferred = new require('q').defer(), src = path.resolve(context.opts.plugin.dir, 'www'), www = path.resolve(context.opts.projectRoot, 'www'), lib = path.resolve(context.opts.projectRoot, 'www', 'lib'), @@ -58,7 +58,7 @@ function showErrorNotice(context, err) { } function ensureExists(context, path, mask) { - var deferred = new context.requireCordovaModule('q').defer(); + var deferred = new require('q').defer(); if (typeof mask == 'function') { // allow the `mask` parameter to be optional cb = mask; mask = 0777;