When creating a new ASP.NET Core project via the project template, the generated package.json file doesn't define a scripts property. Because the scripts property isn't present, the code in TaskParser.LoadTasks fails with an object reference error:
The code was assuming that the scripts section is always present. This PR adds a null check before trying to access the property's children.
When creating a new ASP.NET Core project via the project template, the generated
package.json
file doesn't define ascripts
property. Because thescripts
property isn't present, the code inTaskParser.LoadTasks
fails with an object reference error:The code was assuming that the
scripts
section is always present. This PR adds a null check before trying to access the property's children.