diff --git a/gulpfile.js b/gulpfile.js index 3339a04..226d983 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -72,10 +72,11 @@ function speedtest() { results = { oldresults: { mobile: null, desktop: null }, newresults: {} }, errorOccured = false, - finishedCount = 0; - if (settings.googleAPIKey) { - googleAPIURL += '&key='+settings.googleAPIKey; - } + finishedCount = 0, + key = settings.googleAPIKey ? '&key='+settings.googleAPIKey+'&url=' : '&url='; + // Configure with key + googleAPIURL += key; + if (fs.existsSync(logFile)) { results = JSON.parse(fs.readFileSync(logFile, { encoding: 'Utf-8' })); @@ -253,4 +254,4 @@ function GruntTasks (grunt) { grunt.loadNpmTasks("grunt-then"); grunt.registerTask('default', ['devperf']); -} \ No newline at end of file +}