weex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acton...@apache.org
Subject [09/39] incubator-weex git commit: * [jsfm] return instance in legacy framework
Date Tue, 08 Aug 2017 08:55:21 GMT
* [jsfm] return instance in legacy framework


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

Branch: refs/heads/0.16-dev
Commit: ac348544ccbf46170d714521a0a9cd3cf32901f1
Parents: ac53dc8
Author: Hanks <zhanghan.me@gmail.com>
Authored: Fri Jul 28 13:50:48 2017 +0800
Committer: Hanks <zhanghan.me@gmail.com>
Committed: Fri Jul 28 13:50:48 2017 +0800

----------------------------------------------------------------------
 html5/frameworks/legacy/static/create.js | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ac348544/html5/frameworks/legacy/static/create.js
----------------------------------------------------------------------
diff --git a/html5/frameworks/legacy/static/create.js b/html5/frameworks/legacy/static/create.js
index ae97d46..1c963b3 100644
--- a/html5/frameworks/legacy/static/create.js
+++ b/html5/frameworks/legacy/static/create.js
@@ -42,13 +42,10 @@ export function createInstance (id, code, options, data, info) {
   if (!instance) {
     instance = new App(id, options)
     instanceMap[id] = instance
-    result = initApp(instance,
-                     code,
-                     data,
-                     services)
+    result = initApp(instance, code, data, services)
   }
   else {
     result = new Error(`invalid instance id "${id}"`)
   }
-  return result
+  return (result instanceof Error) ? result : instance
 }


Mime
View raw message