[gjs/wip/require: 4/7] foreign: Cleanup the style slightly



commit 4e8bf8e4c06d5f435430fa2f8a50d79e08edd05a
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Jun 16 17:29:59 2015 -0700

    foreign: Cleanup the style slightly

 gi/foreign.cpp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gi/foreign.cpp b/gi/foreign.cpp
index efbadfd..7e2710a 100644
--- a/gi/foreign.cpp
+++ b/gi/foreign.cpp
@@ -69,9 +69,8 @@ gjs_foreign_load_foreign_module(JSContext *context,
         if (strcmp(gi_namespace, foreign_modules[i].gi_namespace) != 0)
             continue;
 
-        if (foreign_modules[i].loaded) {
+        if (foreign_modules[i].loaded)
             return JS_TRUE;
-        }
 
         // FIXME: Find a way to check if a module is imported
         //        and only execute this statement if isn't
@@ -86,9 +85,10 @@ gjs_foreign_load_foreign_module(JSContext *context,
         }
         g_free(script);
         foreign_modules[i].loaded = TRUE;
+        return JS_TRUE;
     }
 
-    return JS_TRUE;
+    return JS_FALSE;
 }
 
 JSBool


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