bare-url 1.0.10 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -154,7 +154,7 @@ const URL = exports.URL = class URL {
|
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
set search (value) {
|
|
157
|
-
if (value[0] !== '?') value = '?' + value
|
|
157
|
+
if (value && value[0] !== '?') value = '?' + value
|
|
158
158
|
|
|
159
159
|
this._update(this._replace(value, this._components[6] - 1 /* ? */, this._components[7] - 1 /* # */))
|
|
160
160
|
}
|
|
@@ -166,7 +166,7 @@ const URL = exports.URL = class URL {
|
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
set hash (value) {
|
|
169
|
-
if (value[0] !== '#') value = '#' + value
|
|
169
|
+
if (value && value[0] !== '#') value = '#' + value
|
|
170
170
|
|
|
171
171
|
this._update(this._replace(value, this._components[7] - 1 /* # */))
|
|
172
172
|
}
|