mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 04:26:41 -04:00
22 lines
No EOL
542 B
JavaScript
22 lines
No EOL
542 B
JavaScript
Template.error.message= function(){
|
|
var outerContext = Meteor.deps.Context.current;
|
|
var innerContext = new Meteor.deps.Context;
|
|
var error;
|
|
|
|
innerContext.onInvalidate(function() {
|
|
// we don't need to send the invalidate through anymore if post is set
|
|
error || outerContext.invalidate();
|
|
});
|
|
|
|
innerContext.run(function() {
|
|
error = Session.get("error");
|
|
});
|
|
|
|
return error;
|
|
}
|
|
|
|
Template.error.rendered = function(){
|
|
Meteor.setTimeout(function(){
|
|
Session.set("error", null);
|
|
}, 100);
|
|
} |