From c7941c2647eff836271b89a47eb7f7d34ca11165 Mon Sep 17 00:00:00 2001 From: Peter Svensson Date: Thu, 23 Apr 2020 12:58:55 +0200 Subject: [PATCH] fixed sloppy coding whenrefering to storage instead of this.storage in storage nodes --- package.json | 2 +- storage/storage-read.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 85be533..fcf9d3c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-red-contrib-firebase-admin", - "version": "1.1.18", + "version": "1.1.19", "description": "A node-red module that wraps the server-side admin SDK of firebase, firestore, et.c.", "main": "index.js", "scripts": { diff --git a/storage/storage-read.js b/storage/storage-read.js index 458b313..d86393f 100644 --- a/storage/storage-read.js +++ b/storage/storage-read.js @@ -27,7 +27,7 @@ module.exports = function(RED) { if(msg && msg.payload){ let path = msg.payload.path || msg.path || this.path let bucket = msg.payload.bucket || msg.bucket || this.bucket - console.log('------------------------------ storage-read reading from bucket "'+bucket+'" path "'+path+'" this.storage = '+this.storage+' storage = '+storage) + console.log('------------------------------ storage-read reading from bucket "'+bucket+'" path "'+path+'" this.storage = '+this.storage) if(msg.payload.files && msg.payload.files.length > 0){ console.log('--reading from files') let count = msg.payload.files.length @@ -54,7 +54,7 @@ module.exports = function(RED) { } else if(msg){ console.log('* reading single file from path '+path) try{ - let s = this.storage || storage + let s = this.storage s.bucket(bucket) .file(path).download().then((file)=>{ console.log('storage-read got file')