=Fix SessionData Get bug when persistent storage doesn't exist yet
This commit is contained in:
parent
d33131cd78
commit
1a05359193
|
@ -104,7 +104,9 @@ class SessionData {
|
||||||
static [void] Load() {
|
static [void] Load() {
|
||||||
if( -not [SessionData]::Path ) { [SessionData]::Init() }
|
if( -not [SessionData]::Path ) { [SessionData]::Init() }
|
||||||
|
|
||||||
[SessionData]::Data = Import-Clixml -Path $([SessionData]::Path)
|
if( Test-Path $([SessionData]::Path) ) {
|
||||||
|
[SessionData]::Data = Import-Clixml -Path $([SessionData]::Path)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static [void] Set([string]$Name,[object]$Value) {
|
static [void] Set([string]$Name,[object]$Value) {
|
||||||
|
|
Loading…
Reference in New Issue