Browse Source

Correction du chargement de profils partiels via un chemin relatif au profil parent

William Petit 3 years ago
parent
commit
75391a7219
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      src/util/profile.js

+ 3
- 2
src/util/profile.js View File

@@ -26,8 +26,9 @@ exports.load = function(profileUrl, withImports) {
26 26
         node = item.value.node;
27 27
         // For each import found, load the partial and "mount" it on the current item
28 28
         if(node.import) {
29
-          Logger.info('Loading import "%s"', path.resolve(node.import));
30
-          p = exports.load(node.import)
29
+          var importPath = path.resolve(path.dirname(profileUrl), node.import)
30
+          Logger.info('Loading import "%s"', importPath);
31
+          p = exports.load(importPath)
31 32
             .then(_mountImport.bind(node))
32 33
           ;
33 34
           promises.push(p);