Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/prefs.js

Issue 5702539706105856: Issue 2444 - Make preconfigurable property optional (Closed)
Patch Set: Use a set Created May 4, 2015, 5:24 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/prefs.js
===================================================================
--- a/lib/prefs.js
+++ b/lib/prefs.js
@@ -23,11 +23,12 @@
request.send();
let defaults = request.response.defaults;
+ let preconfigurable = new Set(request.response.preconfigurable);
for (let pref in defaults)
{
let value = defaults[pref];
let [getter, setter] = typeMap[typeof value];
- if (request.response.preconfigurable.indexOf(pref) != -1)
+ if (preconfigurable.has(pref))
{
try
{
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld