efront 4.1.2 → 4.1.4

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.
@@ -69,7 +69,7 @@ var isThenable = function (a) {
69
69
  var keyprefix = "";
70
70
  var flushTree = function (tree, key, res) {
71
71
  var response = tree[key];
72
- if (!response.error) {
72
+ if (response && !response.error) {
73
73
  delete tree[key];
74
74
  if (res) tree[key] = res;
75
75
  }
@@ -108,13 +108,13 @@ var splitParams = function (params) {
108
108
  for (var cx = 0, dx = code.length; cx < dx; cx++) {
109
109
  var o = code[cx];
110
110
  if (o.type === STAMP && o.text === ',') {
111
- params.push(createString(p));
111
+ params.push(createString(p).trim());
112
112
  p = [];
113
113
  continue;
114
114
  }
115
115
  p.push(o);
116
116
  }
117
- if (p.length) params.push(createString(p));
117
+ if (p.length) params.push(createString(p).trim());
118
118
  return params;
119
119
  }
120
120
  var createArgMap = function (args, split = ',', equal = ':') {
@@ -57,6 +57,8 @@ test(`:not(a):not(b){c:d}`, `:not(a):not(b){c:d;}`);
57
57
  test(`a>{b{a:b}}`, `a>b{a:b;}`);
58
58
  test(`a >{b{a:b}}`, `a>b{a:b;}`);
59
59
  test(`a{>b{a:b}}`, `a>b{a:b;}`);
60
+ test(`.type(@type,@media) {.@{type} {&:before{content:"@{media}";}}}.type(videoinput, "相机");`, `.videoinput:before{content:"相机";}`);
61
+ test(`.type(@type,@media) {.@{type} {&:before{content:"@{media}";}}}.type(videoinput, 相机);`, `.videoinput:before{content:"相机";}`);
60
62
  assert(素馨(`:not(a):not(b){c:d}`, 'abc'), `abc :not(a):not(b){c:d;}`);
61
63
  assert(素馨(`&:not(a):not(b){c:d}`, 'abc'), `abc:not(a):not(b){c:d;}`);
62
64
  assert(素馨(`:scope{&:not(a):not(b){c:d}}`, 'abc'), `abc:not(a):not(b){c:d;}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efront",
3
- "version": "4.1.2",
3
+ "version": "4.1.4",
4
4
  "description": "简化前端开发,优化web性能",
5
5
  "main": "public/efront.js",
6
6
  "directories": {