File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -37,8 +37,11 @@ var app = riot.observable({
3737 localStorage . setItem ( 'controlsVisible' , this . controlsVisible ? 'true' : 'false' ) ;
3838 } ,
3939 route : function ( view , param ) {
40- app . viewParam = param ;
41- app . trigger ( 'route' , view || 'emulator' , param ) ;
40+ if ( app . view !== view || app . viewParam !== param ) { // Workaround for https://github.com/riot/route/issues/28
41+ app . view = view ;
42+ app . viewParam = param ;
43+ app . trigger ( 'route' , view || 'emulator' , param ) ;
44+ }
4245 } ,
4346 watch : function ( events , tag , callback ) {
4447 callback = callback . bind ( tag ) ;
@@ -59,6 +62,10 @@ $(document).ready(function() {
5962 riot . route . start ( true ) ; // start + exec
6063} ) ;
6164
65+ $ ( window ) . on ( 'hashchange' , function ( ) {
66+ riot . route . exec ( ) ; // Workaround for https://github.com/riot/route/issues/28
67+ } )
68+
6269//=========================================================
6370// Utilities
6471//=========================================================
You can’t perform that action at this time.
0 commit comments