Skip to content

Commit

Permalink
refactor: Update utilFns.js to handle loopcls parameter properly
Browse files Browse the repository at this point in the history
  • Loading branch information
nmaguiar committed Jun 22, 2024
1 parent ce4fca5 commit d4b65f4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions src/include/utilFns.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ const _chartPathParse = (r, frmt, prefix, isStatic) => {
const _print = (m) => {
if ("undefined" !== typeof m) {
if ("undefined" === typeof params.outfile) {
if (toBoolean(params.loopcls)) cls()
print(m)
} else {
if ("undefined" === typeof global.__oafp_streams) global.__oafp_streams = {}
Expand Down
2 changes: 0 additions & 2 deletions src/oafp.source.js.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,6 @@ if (isNumber(params.loop)) {
if (isDef(params.outfile)) {
global.__oafp_streams[params.outfile].close()
global.__oafp_streams[params.outfile] = io.writeFileStream(params.outfile, toBoolean(params.outfileappend))
} else {
cls()
}
}
_run()
Expand Down

0 comments on commit d4b65f4

Please sign in to comment.