Skip to content

Commit

Permalink
don't pass view options
Browse files Browse the repository at this point in the history
  • Loading branch information
legobeat committed May 10, 2023
1 parent d460cc1 commit dca7a1e
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/file-handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import SqrlErr from './err'
import compile from './compile'
import { getConfig } from './config'
import { getPath, readFile, loadFile } from './file-utils'
import { promiseImpl, copyProps } from './utils'
import { promiseImpl } from './utils'

/* TYPES */

Expand Down Expand Up @@ -34,7 +34,6 @@ interface DataObj {
* `options.filename` so it must be set prior to calling this function.
*
* @param {Options} options compilation options
* @param {String} [template] template source
* @return {(TemplateFunction|ClientFunction)}
* Depending on the value of `options.client`, either type might be returned.
* @static
Expand Down Expand Up @@ -123,13 +122,6 @@ function renderFile (filename: string, data: DataObj, cb?: CallbackFn) {
if (data.settings['view cache']) {
Config.cache = true
}
// Undocumented after Express 2, but still usable, esp. for
// items that are unsafe to be passed along with data, like `root`
var viewOpts = data.settings['view options']

if (viewOpts) {
copyProps(Config, viewOpts)
}
}

Config.filename = filename // Make sure filename is right
Expand Down

0 comments on commit dca7a1e

Please sign in to comment.