Skip to content

Commit bc99775

Browse files
committed
fixed: generators for routes
1 parent b20210f commit bc99775

8 files changed

Lines changed: 16 additions & 9 deletions

File tree

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ function Framework() {
189189

190190
this.id = null;
191191
this.version = 1730;
192-
this.version_header = '1.7.3 (build: 46)';
192+
this.version_header = '1.7.3 (build: 47)';
193193

194194
var version = process.version.toString().replace('v', '').replace(/\./g, '');
195195

@@ -791,7 +791,7 @@ Framework.prototype.route = function(url, funcExecute, flags, length, middleware
791791
var isNOXHR = false;
792792
var method = '';
793793
var schema;
794-
var isGENERATOR = false;
794+
var isGENERATOR = funcExecute.toString().indexOf('function*') === 0;
795795

796796
if (flags) {
797797

minify/merged/total.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

minify/total.js/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

minify/total.js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,5 @@
6767
"scripts": {
6868
"test": "echo \"Error: no test specified\" && exit 1"
6969
},
70-
"version": "1.7.3-46"
70+
"version": "1.7.3-47"
7171
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,5 @@
6767
"scripts": {
6868
"test": "echo \"Error: no test specified\" && exit 1"
6969
},
70-
"version": "1.7.3-46"
70+
"version": "1.7.3-47"
7171
}

test/controllers/default.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ exports.install = function(framework) {
2424
flags: ['unauthorize']
2525
});
2626

27-
framework.route('/sync/', synchronize, ['sync']);
27+
framework.route('/sync/', synchronize);
2828
framework.route('/package/', '@testpackage/test');
2929
framework.route('/precompile/', view_precomile);
3030
framework.route('/homepage/', view_homepage);

test/test-tests.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
var cube = x => x * x * x;
22

3-
console.log(cube(23));
3+
function *a() {
4+
5+
}
6+
7+
var b = a;
8+
9+
console.log(b.toString().indexOf('function*'));

test/views/fromURL.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@{config.name}

0 commit comments

Comments
 (0)