diff --git a/common/content/completion.js b/common/content/completion.js index 376838a1..40f4d086 100644 --- a/common/content/completion.js +++ b/common/content/completion.js @@ -234,10 +234,10 @@ CompletionContext.prototype = { if (!context.hasItems) return []; let prefix = self.value.substring(minStart, context.offset); - return context.items.map(function (item) { - item.text = prefix + item.text; - return item; - }); + return context.items.map(function (item) ({ + text: prefix + item.text, + __proto__: item + })); }); return { start: minStart, items: util.Array.flatten(items), longestSubstring: this.longestAllSubstring }; }