Last active
August 29, 2015 14:05
-
-
Save caisui/efddb6a16cb2ede5284e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/common/content/completion.js b/common/content/completion.js | |
index fbbfdef..8ab68e7 100644 | |
--- a/common/content/completion.js | |
+++ b/common/content/completion.js | |
@@ -208,7 +208,13 @@ const CompletionContext = Class("CompletionContext", { | |
__proto__: item | |
})); | |
}); | |
- return { start: minStart, items: util.Array.flatten(items), longestSubstring: this.longestAllSubstring | |
+ return { start: minStart, items: util.Array.flatten(items), | |
+ get longestSubstring() { | |
+ var value = self.longestAllSubstring; | |
+ Object.defineProperty(this, "longestSubstring", { value: value}); | |
+ return value; | |
+ } | |
+ }; | |
} | |
catch (e) { | |
liberator.echoerr(e); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment