[ 
https://issues.apache.org/jira/browse/WEEX-438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16519184#comment-16519184
 ] 

Hanks Zhang commented on WEEX-438:
----------------------------------

"TypeError: undefined is not an object" is really a common error in javascript. 
It's mainly caused by trying to read a property from undefined variable.

 

In this case, the "root" or "root.clearTimeout" may be undefined, add a type 
check before using them can avoid is error.

> vue-rx error:  exception:Exception: TypeError: undefined is not an object 
> (evaluating 'root.clearTimeout.bind')
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: WEEX-438
>                 URL: https://issues.apache.org/jira/browse/WEEX-438
>             Project: Weex
>          Issue Type: Bug
>          Components: JSFM
>            Reporter: itfront
>            Assignee: Hanks Zhang
>            Priority: Major
>              Labels: clearTimeout.bind, rxjs
>
> <template>
>  <div>
>  <span>Age:\{{ age$ }}</span>
>  </div>
> </template>
> <script>
>  import Vue from 'vue'
>  import VueRx from 'vue-rx'
>  import Rx from 'rxjs/Rx'
> Vue.use(VueRx, Rx)
> module.exports = {
>  subscriptions () {
>  return {
>  age$: Rx.Observable.of(23)
>  .map(data => data),
>  }
>  }
>  }
> </script>



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to