You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ha...@apache.org on 2018/05/23 11:02:54 UTC

incubator-weex git commit: * [jsfm] modify regex to enable component name contains '-' [Forced Update!]

Repository: incubator-weex
Updated Branches:
  refs/heads/master 1c8d53961 -> 283e61491 (forced update)


* [jsfm] modify regex to enable component name contains '-'

resolve #1149


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/283e6149
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/283e6149
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/283e6149

Branch: refs/heads/master
Commit: 283e61491ae063f834c9d04187073809811a3cc8
Parents: eda4614
Author: seewhy <se...@163.com>
Authored: Sun May 6 22:26:31 2018 +0800
Committer: Hanks <zh...@gmail.com>
Committed: Wed May 23 19:02:08 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/283e6149/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]