1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2024-11-05 09:56:22 +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).
*/
Sheet.prototype.save = function( filename ) {
filename = filename || this.meta.fileName;
FS.writeFileSync( filename, this.stringify(), 'utf8' );
this.meta.fileName = filename || this.meta.fileName;
FS.writeFileSync( this.meta.fileName, this.stringify(), 'utf8' );
return this;
};