[gjs] context: Simplify condition



commit 94716559339146cb8339e4eeff0dc2652845e3c8
Author: Evan Welsh <contact evanwelsh com>
Date:   Sat Sep 4 19:58:31 2021 -0700

    context: Simplify condition
    
    (Taken from !557)

 gjs/context.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/gjs/context.cpp b/gjs/context.cpp
index d8992a58..38526075 100644
--- a/gjs/context.cpp
+++ b/gjs/context.cpp
@@ -1325,9 +1325,7 @@ bool GjsContextPrivate::eval_module(const char* identifier,
         return false;
     }
 
-    bool ok = true;
-    if (!JS::ModuleEvaluate(m_cx, obj))
-        ok = false;
+    bool ok = JS::ModuleEvaluate(m_cx, obj);
 
     /* The promise job queue should be drained even on error, to finish
      * outstanding async tasks before the context is torn down. Drain after


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