I’m getting an error when I click a ‘Submit’ button on a form. I’m trying to populate a table with data. I’m at a loss, if anyone has insight please let me know:
in p
in ForwardRef
in ForwardRef
in div
in ForwardRef
in ForwardRef
in div
in ForwardRef
in ForwardRef
in ForwardRef
in ForwardRef
in u
in Dashboard
in t
in div
in t
in t
in n
This PowerShell code executes perfectly fine on the same server within ISE:
$Data = @()
$scanData = (invoke-nmap localhost -preset QuickPlus)
foreach($hostEntry in ($scanData | select *)){
foreach($portEntry in $hostEntry.ports){
$Data += @{Hostname = $hostEntry.Hostname; OS = $hostEntry.OS; IPv4 = $hostEntry.IPv4; Protocol = $portEntry.Protocol; Port = $portEntry.Port; Services = $portEntry.Services}
}
}
I tried casting those variables as strings but still was getting the error. I went as far as to comment out that entire section. The error suggests it’s unhappy with a ForEach loop somewhere. At this point I’m simply trying to update the Table when I click Submit on the form.
I just had another attempt to convert my 2.9.0 dash onto the latest 2.9.8 framework in PowershellUniversal and I’m also hitting this error on a couple of my pages/components, I wondered if you got to the bottom of the minified react error #31 or if the solution is relevant to my issue…
Specifically I have this code which works without issue on 2.9.0:
The problem is Set-UDElement’s JavaScript implementation for New-UDElement is expecting an array but receiving a single item. If you force it to an array, it should work.