Prechádzať zdrojové kódy

A few tweaks to ProjectDocumentSource. refs #1004

http://source.rd.rcg.local/trac/eagle6/changeset/1336/Eagle6_SVN
Philip Murray 12 rokov pred
rodič
commit
d8c210087a

+ 6 - 4
lib/pipeline/documentSources/ProjectDocumentSource.js

@@ -37,7 +37,7 @@ var ProjectDocumentSource = module.exports = (function(){
 	*	@return {bool} The result of base.pSource.eof()
 	**/
 	proto.eof = function eof() {
-        return this.base.pSource.eof();
+        return this.pSource.eof();
     };
 
 	/**
@@ -46,7 +46,7 @@ var ProjectDocumentSource = module.exports = (function(){
 	*	@return {bool} The result of base.pSource.advance()
 	**/
 	proto.advance = function advance() {
-        return this.base.pSource.advance();
+        return this.pSource.advance();
     };
 
 
@@ -56,7 +56,7 @@ var ProjectDocumentSource = module.exports = (function(){
 	*	@return A document that represents this base document
 	**/
 	proto.getCurrent = function getCurrent() {
-		var inDocument = base.pSource.getCurrent();
+		var inDocument = this.pSource.getCurrent();
 		if (!inDocument) {
 			throw new Error('inDocument must be an object');
 		}
@@ -83,7 +83,9 @@ var ProjectDocumentSource = module.exports = (function(){
 	 * @return
 	**/
 	proto.sourceToJson = function sourceToJson(builder, explain) {
-        builder[this.projectName] = this.EO;
+		var insides = {};
+		this.EO.documentToJSON(insides, true);
+        builder[this.getSourceName()] = insides;
     };
 
 	/**