Repository: incubator-weex Updated Branches: refs/heads/master eda4614c9 -> 1c8d53961
* [jsfm] modify regex to enable component name contains '-' Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/1c8d5396 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/1c8d5396 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/1c8d5396 Branch: refs/heads/master Commit: 1c8d53961bb64c75556e566d1939a7d07407c8dc Parents: eda4614 Author: seewhy <[email protected]> Authored: Sun May 6 22:26:31 2018 +0800 Committer: Hanks <[email protected]> Committed: Wed May 23 19:00:24 2018 +0800 ---------------------------------------------------------------------- runtime/api/WeexInstance.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/1c8d5396/runtime/api/WeexInstance.js ---------------------------------------------------------------------- diff --git a/runtime/api/WeexInstance.js b/runtime/api/WeexInstance.js index de45c69..38dab1e 100644 --- a/runtime/api/WeexInstance.js +++ b/runtime/api/WeexInstance.js @@ -115,7 +115,7 @@ export default class WeexInstance { supports (condition) { if (typeof condition !== 'string') return null - const res = condition.match(/^@(\w+)\/(\w+)(\.(\w+))?$/i) + const res = condition.match(/^@(\w+)\/([\w-]+)(\.(\w+))?$/i) if (res) { const type = res[1] const name = res[2]
