Index: lib/content/snippets.js |
=================================================================== |
--- a/lib/content/snippets.js |
+++ b/lib/content/snippets.js |
@@ -711,27 +711,27 @@ |
descriptor.configurable = true; |
Object.defineProperty(object, property, descriptor); |
return; |
} |
let name = property.slice(0, dotIndex); |
property = property.slice(dotIndex + 1); |
let value = object[name]; |
- if (value && typeof value == "object") |
+ if (value && (typeof value == "object" || typeof value == "function")) |
wrapPropertyAccess(value, property, descriptor); |
let currentDescriptor = Object.getOwnPropertyDescriptor(object, name); |
if (currentDescriptor && !currentDescriptor.configurable) |
return; |
let setter = newValue => |
{ |
value = newValue; |
- if (newValue && typeof newValue == "object") |
+ if (newValue && (typeof newValue == "object" || typeof value == "function")) |
wrapPropertyAccess(newValue, property, descriptor); |
}; |
Object.defineProperty(object, name, { |
get: () => value, |
set: setter, |
configurable: true |
}); |