1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2024-11-25 09:50:11 +00:00

Add filename metadata on save.

This commit is contained in:
devlinjd 2015-11-06 14:56:33 -05:00
parent aa0ef4e8a4
commit 99722e3bd1

View File

@ -39,8 +39,8 @@ Abstract character/resume sheet representation.
Save the sheet to disk (for environments that have disk access). Save the sheet to disk (for environments that have disk access).
*/ */
Sheet.prototype.save = function( filename ) { Sheet.prototype.save = function( filename ) {
filename = filename || this.meta.fileName; this.meta.fileName = filename || this.meta.fileName;
FS.writeFileSync( filename, this.stringify(), 'utf8' ); FS.writeFileSync( this.meta.fileName, this.stringify(), 'utf8' );
return this; return this;
}; };