mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Shift the args before coercing the value
This commit is contained in:
@@ -394,17 +394,17 @@ class Config
|
||||
# * `true` if the value was set.
|
||||
# * `false` if the value was not able to be coerced to the type specified in the setting's schema.
|
||||
set: (scope, keyPath, value) ->
|
||||
if arguments.length < 3
|
||||
value = keyPath
|
||||
keyPath = scope
|
||||
scope = undefined
|
||||
|
||||
unless value == undefined
|
||||
try
|
||||
value = @makeValueConformToSchema(keyPath, value)
|
||||
catch e
|
||||
return false
|
||||
|
||||
if arguments.length < 3
|
||||
value = keyPath
|
||||
keyPath = scope
|
||||
scope = undefined
|
||||
|
||||
if scope?
|
||||
@addRawScopedValue(scope, keyPath, value)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user