We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f23eb84 commit 827578fCopy full SHA for 827578f
dataflow/extensible-templates/dataflow_udf_transform.js
@@ -20,11 +20,9 @@
20
* @param {string} inJson input Pub/Sub JSON message (stringified)
21
*/
22
function process(inJson) {
23
- // Nashorn engine is only ECMAScript 5.1 (ES5) compliant. Newer ES6
24
- // JavaScript keywords like `let` or `const` will cause syntax errors.
25
- var obj = JSON.parse(inJson);
26
- var includePubsubMessage = obj.data && obj.attributes;
27
- var data = includePubsubMessage ? obj.data : obj;
+ const obj = JSON.parse(inJson);
+ const includePubsubMessage = obj.data && obj.attributes;
+ const data = includePubsubMessage ? obj.data : obj;
28
29
if (!data.hasOwnProperty('url')) {
30
throw new Error("No url found");
0 commit comments