Google Apps Script Throws Error When Trying To Call Object.assign()
Google Apps Script doesn't appear to recognize the function Object.assign(). When trying to use it I get the error: TypeError: Cannot find function assign in object function Objec
Solution 1:
Apps Script is NOT (as of this writing) a full implementation of the Ecmascript standard and currently does not natively support Object.assign()
. However, you can leverage polyfills (when viable) that can add the needed functionality.
There is a polyfill available for Object.assign()
on MDN at the following link:
Baca Juga
- I'm Trying To Make An Id Searcher Which Does A Thing When You Input The Right Id. However, The If Statement Always Runs. Why Is This?
- Gas: How To Change A Global Variable Value And Preserve Its Changed Value When Using The Variable In A Handler Function?
- Focus Textarea With Caret After Text In Android Browser
Note: Rumor has it that Apps Script will be upgraded (at some point in the near future) to use Chrome's V8 engine thereby supporting EcmaScript 2017.
Post a Comment for "Google Apps Script Throws Error When Trying To Call Object.assign()"