Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

麻烦升级一下mmState,请求异常情况添加xhr到回调函数中 #65

Open
fengxinming opened this issue Apr 19, 2015 · 1 comment

Comments

@fengxinming
Copy link

xhr.onreadystatechange = function() {
                if (xhr.readyState === 4) {
                    var status = xhr.status;
                    if (status > 399 && status < 600) {
                        reason.message = "templateUrl对应资源不存在或没有开启 CORS"
                        reason.xhr = xhr
                        reject(reason)
                    } else {
                        resolve(avalon.templateCache[url] = xhr.responseText)
                    }
                }
            }
@gogoyqj
Copy link
Contributor

gogoyqj commented Apr 20, 2015

o

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants