aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--parseLDIF.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/parseLDIF.js b/parseLDIF.js
index 3e932c1..e060f54 100644
--- a/parseLDIF.js
+++ b/parseLDIF.js
@@ -168,7 +168,7 @@ const usefulFields = ["birthyear", "c", "cn", "description",
"mobile", "mozillaHomeCountryName", "mozillaHomeLocalityName",
"mozillaHomePostalCode", "mozillaHomeState", "mozillaHomeStreet",
"mozillaHomeUrl", "mozillaNickname", "o", "sn", "st", "street",
- "telephoneNumber", "title", "givenname", "objectclass"
+ "telephoneNumber", "title", "objectclass"
];
function debug(str) {
@@ -289,7 +289,7 @@ function parseLDIF(inStr) {
return out_records;
}
-if (arguments.length == 1) {
+if (arguments && arguments.length == 1) {
var lines = readFile(arguments[0]).replace(/\r\n/g,"\n");
print(parseLDIF(lines.split("\n")).toSource());
}