Fixed the .js file was not generated when the print option is specified