Skip to content

Commit

Permalink
Allow function properties in settings
Browse files Browse the repository at this point in the history
  • Loading branch information
knolleary committed Jan 29, 2016
1 parent a115301 commit c76ba1d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions red/runtime/settings.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2014 IBM Corp.
* Copyright 2014, 2016 IBM Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -28,7 +28,8 @@ var persistentSettings = {
userSettings = settings;
for (var i in settings) {
/* istanbul ignore else */
if (settings.hasOwnProperty(i) && typeof settings[i] !== "function") {
if (settings.hasOwnProperty(i) && i !== 'load' && i !== 'get' && i !== 'set' && i !== 'available' && i !== 'reset') {
// Don't allow any of the core functions get replaced via settings
(function() {
var j = i;
persistentSettings.__defineGetter__(j,function() { return userSettings[j]; });
Expand Down

0 comments on commit c76ba1d

Please sign in to comment.