Shaddock Heath 9 years ago
parent
commit
a9b0f94376
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Source/AtomicJS/Javascript/JSRequire.cpp

+ 2 - 2
Source/AtomicJS/Javascript/JSRequire.cpp

@@ -124,8 +124,8 @@ namespace Atomic
         SplitPath(moduleID, pathName, fileName, extension);
         SplitPath(moduleID, pathName, fileName, extension);
         String path = moduleID;
         String path = moduleID;
 
 
-        // Do we really want this?  It is nice to not have to specify the Atomic path
-        if (fileName.StartsWith("Atomic"))
+        // It is nice to not have to specify the Atomic path, but verify that the module exists first since it could be user provided
+        if (fileName.StartsWith("Atomic") && cache->Exists("AtomicModules/" + path + ".js"))
         {
         {
             path = "AtomicModules/" + path + ".js";
             path = "AtomicModules/" + path + ".js";
         }
         }