wapplr 1.0.64 → 1.0.66
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/dist/common/styles.js
CHANGED
|
@@ -65,7 +65,7 @@ function createDefaultStyleManager() {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
function defaultAdd(style) {
|
|
68
|
-
var cssText = style._getCss();
|
|
68
|
+
var cssText = style._getCss ? style._getCss() : '';
|
|
69
69
|
|
|
70
70
|
style._insertCss = function _insertCss() {
|
|
71
71
|
var insertCss = styleManager.insertCss;
|
|
@@ -122,7 +122,7 @@ function createDefaultStyleManager() {
|
|
|
122
122
|
WAPP = _globals$WAPP === void 0 ? "buildHash" : _globals$WAPP,
|
|
123
123
|
DEV = globals.DEV;
|
|
124
124
|
var cssText = (0, _toConsumableArray2["default"])(styleManager.css).map(function (style) {
|
|
125
|
-
return style._getCss();
|
|
125
|
+
return style._getCss ? style._getCss() : '';
|
|
126
126
|
}).join("");
|
|
127
127
|
|
|
128
128
|
if (!DEV) {
|
|
@@ -282,7 +282,8 @@ function createMiddlewares(p) {
|
|
|
282
282
|
_sendData$stats = sendData.stats,
|
|
283
283
|
stats = _sendData$stats === void 0 ? {} : _sendData$stats,
|
|
284
284
|
_sendData$parsedPath = sendData.parsedPath,
|
|
285
|
-
parsedPath = _sendData$parsedPath === void 0 ? {} : _sendData$parsedPath
|
|
285
|
+
parsedPath = _sendData$parsedPath === void 0 ? {} : _sendData$parsedPath,
|
|
286
|
+
dontSetContentLength = sendData.dontSetContentLength;
|
|
286
287
|
var _html = data;
|
|
287
288
|
var _parsedPath$ext = parsedPath.ext,
|
|
288
289
|
ext = _parsedPath$ext === void 0 ? ".html" : _parsedPath$ext;
|
|
@@ -299,7 +300,7 @@ function createMiddlewares(p) {
|
|
|
299
300
|
}).join('; '));
|
|
300
301
|
}
|
|
301
302
|
|
|
302
|
-
if (!res.getHeader("Content-Length")) {
|
|
303
|
+
if (!res.getHeader("Content-Length") && !dontSetContentLength) {
|
|
303
304
|
res.setHeader("Content-Length", Buffer.byteLength(_html));
|
|
304
305
|
}
|
|
305
306
|
|