1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00
This commit is contained in:
Tom Limoncelli
2020-08-26 13:45:02 -04:00
committed by GitHub
parent 57d9cfa356
commit d6dd13820f
5 changed files with 21 additions and 21 deletions

View File

@ -143,7 +143,7 @@ func listFiles(call otto.FunctionCall) otto.Value {
}
// Second: Recursive?
var recursive bool = true;
var recursive bool = true
if call.Argument(1).IsDefined() && !call.Argument(1).IsNull() {
if call.Argument(1).IsBoolean() {
recursive, _ = call.Argument(1).ToBoolean() // If it should be recursive
@ -153,7 +153,7 @@ func listFiles(call otto.FunctionCall) otto.Value {
}
// Third: File extension filter.
var fileExtension string = ".js";
var fileExtension string = ".js"
if call.Argument(2).IsDefined() && !call.Argument(2).IsNull() {
if call.Argument(2).IsString() {
fileExtension = call.Argument(2).String() // Which file extension to filter for.