mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-20 16:49:52 +00:00
Fix for getprivateint/string defaultvalue, check for value, not just section (#944)
* Fix for getprivateint defaultvalue, check for value, not just section * fix getprivatestring too
This commit is contained in:
parent
9ec4b8d882
commit
59feff8dd5
1 changed files with 8 additions and 2 deletions
|
|
@ -119,7 +119,10 @@ class System extends MakiObject {
|
|||
}
|
||||
|
||||
getprivateint(section: string, item: string, defvalue: number): number {
|
||||
if (!this._privateInt.has(section)) {
|
||||
if (
|
||||
!this._privateInt.has(section) ||
|
||||
!this._privateInt.get(section).has(item)
|
||||
) {
|
||||
return defvalue;
|
||||
}
|
||||
// @ts-ignore We know this section exists
|
||||
|
|
@ -630,7 +633,10 @@ class System extends MakiObject {
|
|||
}
|
||||
|
||||
getprivatestring(section: string, item: string, defvalue: string): string {
|
||||
if (!this._privateString.has(section)) {
|
||||
if (
|
||||
!this._privateString.has(section) ||
|
||||
!this._privateString.get(section).has(item)
|
||||
) {
|
||||
return defvalue;
|
||||
}
|
||||
// @ts-ignore We know the section exists
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue