@server/next 0.20.17 → 0.20.18
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/package.json +1 -1
- package/src/index.js +9 -5
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -118,11 +118,15 @@ export default function server(options = {}) {
|
|
|
118
118
|
if (!(this instanceof server)) {
|
|
119
119
|
const inst = new server(options);
|
|
120
120
|
const cb = inst.netlify;
|
|
121
|
-
Object.keys(Object.getPrototypeOf(inst)).
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
121
|
+
const keys = Object.keys(Object.getPrototypeOf(inst)).concat(
|
|
122
|
+
Object.keys(inst)
|
|
123
|
+
);
|
|
124
|
+
keys.forEach((key) => {
|
|
125
|
+
if (typeof inst[key] === "function") {
|
|
126
|
+
cb[key] = inst[key].bind(inst);
|
|
127
|
+
} else {
|
|
128
|
+
cb[key] = inst[key];
|
|
129
|
+
}
|
|
126
130
|
});
|
|
127
131
|
return cb;
|
|
128
132
|
}
|