Skip to content

Commit

Permalink
Merge pull request #12 from larkjs/viringbells
Browse files Browse the repository at this point in the history
Viringbells
  • Loading branch information
viRingbells committed Nov 18, 2015
2 parents d7c5bac + 388fc2e commit 3f285ab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
17 changes: 10 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,17 @@ var larkMVC = function(options, lark){
}

function createModel (layerproxy, _pathsplit, type, options) {
options = options || {};
var type = type || _pathsplit.shift();
var ignore = options.ignore || '';
if ('string' === typeof ignore) {
ignore = [ignore];
}
if (options && options.ignore && _pathsplit.indexOf(options.ignore) >=0) {
return;
if (options && options.ignore) {
if (!Array.isArray(options.ignore)) {
options.ignore = [options.ignore];
}
for (var i = 0; i < options.ignore.length; i++) {
var ignore = options.ignore[i];
if (_pathsplit.indexOf(ignore) >=0) {
return;
}
}
}
var name = _pathsplit.join('/');
switch (type) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lark-mvc",
"version": "0.4.5",
"version": "0.4.7",
"description": "MVC for building web server with lark.js",
"main": "index.js",
"directories": {
Expand Down

0 comments on commit 3f285ab

Please sign in to comment.