Skip to content

Commit 86930c2

Browse files
committed
And temporary tweak to enable advanced_settings for existing users
Will be removed in a later release. Signed-off-by: Mike Beattie <[email protected]>
1 parent e581a99 commit 86930c2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Sources/app.js

+9
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,15 @@ function APIRequest(jsonObj) {
226226
}
227227
}
228228

229+
// Temporary tweak to not break existing user configs after creating 'advanced_settings' boolean
230+
// If the settings hash has more than one key, and it has a request_url, it's got other settings, so set it to true.
231+
if (!settings.hasOwnProperty('advanced_settings') && settings.hasOwnProperty('request_url') && (Object.keys(settings).length > 1)) {
232+
log('enabling advanced settings');
233+
settings.advanced_settings = true;
234+
$SD.api.setSettings(context, settings);
235+
}
236+
// End temporary tweak
237+
229238
restartPeriodicPoll();
230239

231240
return {

0 commit comments

Comments
 (0)