Jelajahi Sumber

Bugfix: options argument should be optional.

Afshin Darian 8 tahun lalu
induk
melakukan
1e75866165
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      src/console/history.ts

+ 1 - 1
src/console/history.ts

@@ -68,7 +68,7 @@ class ConsoleHistory implements IConsoleHistory {
    */
   constructor(options?: ConsoleHistory.IOptions) {
     this._history = new Vector<string>();
-    if (options.kernel) {
+    if (options && options.kernel) {
       this.kernel = options.kernel;
     }
   }