crash fixes

This commit is contained in:
Girish Ramakrishnan
2023-08-17 13:02:36 +05:30
parent 3d0ba557e5
commit 5c98b6f080
5 changed files with 26 additions and 14 deletions

View File

@@ -1,7 +1,13 @@
'use strict';
const assert = require('assert');
class Location {
constructor(subdomain, domain, type, certificate) {
assert(subdomain === null || typeof subdomain === 'string');
assert(domain === null || typeof domain === 'string');
assert.strictEqual(typeof type, 'string');
this.subdomain = subdomain;
this.domain = domain;
this.type = type;