mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-22 17:47:53 +00:00
Make aspnet-webpack resilient against Webpack configs with nonstring entrypoints. Fixes #376.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "aspnet-webpack",
|
||||
"version": "1.0.20",
|
||||
"version": "1.0.21",
|
||||
"description": "Helpers for using Webpack in ASP.NET Core projects. Works in conjunction with the Microsoft.AspNetCore.SpaServices NuGet package.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -231,7 +231,7 @@ function getPath(publicPath: string) {
|
||||
function firstIndexOfStringStartingWith(array: string[], prefixToFind: string) {
|
||||
for (let index = 0; index < array.length; index++) {
|
||||
const candidate = array[index];
|
||||
if (candidate.substring(0, prefixToFind.length) === prefixToFind) {
|
||||
if ((typeof candidate === 'string') && (candidate.substring(0, prefixToFind.length) === prefixToFind)) {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user