[gjs] installed-tests: check if stack is defined



commit b8c7195767b8eb4871e5de7abaf7accb3113feaf
Author: Claudio André <claudioandre br gmail com>
Date:   Sat Jan 21 10:53:36 2017 -0200

    installed-tests: check if stack is defined
    
    In order to avoid to introduce new errors in the error report.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=776549

 installed-tests/js/minijasmine.js |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/installed-tests/js/minijasmine.js b/installed-tests/js/minijasmine.js
index 0345ec3..b03c205 100644
--- a/installed-tests/js/minijasmine.js
+++ b/installed-tests/js/minijasmine.js
@@ -9,6 +9,9 @@ function _removeNewlines(str) {
 }
 
 function _filterStack(stack) {
+    if (!stack)
+        return 'No stack';
+
     return stack.split('\n')
         .filter(stackLine => stackLine.indexOf('resource:///org/gjs/jsunit') === -1)
         .filter(stackLine => stackLine.indexOf('<jasmine-start>') === -1)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]