googleapis / nodejs-projectify

A simple utility for replacing the projectId token in objects.
Apache License 2.0
8 stars 6 forks source link

fix: do not replace projectId on stream objects #53

Closed jkwlui closed 5 years ago

jkwlui commented 5 years ago

https://github.com/googleapis/nodejs-storage/issues/390 points out that OOM happens when replaceProjectIdToken() is passed { 'Content-Type': 'image/jpeg', body: [DestroyableTransform] } where the function tries to iterate through the stream's properties.

The stream doesn't contain strings that needs replacing, so let's skip this.