mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-26 18:58:21 +02:00
Doc: Fix a minor issue in comment (#10011)
This commit is contained in:
parent
2ac7997c07
commit
b4cc6803e7
@ -2310,7 +2310,7 @@ class Setting extends BaseModel {
|
|||||||
public static value(key: string) {
|
public static value(key: string) {
|
||||||
// Need to copy arrays and objects since in setValue(), the old value and new one is compared
|
// Need to copy arrays and objects since in setValue(), the old value and new one is compared
|
||||||
// with strict equality and the value is updated only if changed. However if the caller acquire
|
// with strict equality and the value is updated only if changed. However if the caller acquire
|
||||||
// and object and change a key, the objects will be detected as equal. By returning a copy
|
// an object and change a key, the objects will be detected as equal. By returning a copy
|
||||||
// we avoid this problem.
|
// we avoid this problem.
|
||||||
function copyIfNeeded(value: any) {
|
function copyIfNeeded(value: any) {
|
||||||
if (value === null || value === undefined) return value;
|
if (value === null || value === undefined) return value;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user