File tree 2 files changed +16
-2
lines changed
2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import PromiseProxyMixin from '@ember/object/promise-proxy-mixin';
5
5
import ArrayProxy from '@ember/array/proxy' ;
6
6
import { computed , observer } from '@ember/object' ;
7
7
import { later } from '@ember/runloop' ;
8
- import $ from 'jquery' ;
9
8
import moment from 'moment' ;
10
9
11
10
const NUM_VERSIONS = 5 ;
@@ -185,6 +184,13 @@ export default Controller.extend({
185
184
} ,
186
185
187
186
report : observer ( 'crate.readme' , function ( ) {
188
- setTimeout ( ( ) => $ ( window ) . trigger ( 'hashchange' ) ) ;
187
+ if ( typeof document === 'undefined' ) {
188
+ return ;
189
+ }
190
+ setTimeout ( ( ) => {
191
+ let e = document . createEvent ( 'CustomEvent' ) ;
192
+ e . initCustomEvent ( 'hashchange' , true , true ) ;
193
+ window . dispatchEvent ( e ) ;
194
+ } ) ;
189
195
} ) ,
190
196
} ) ;
Original file line number Diff line number Diff line change
1
+ export default {
2
+ name : 'ajax-service' ,
3
+ initialize ( ) {
4
+ // This is to override Fastboot's initializer which prevents ember-fetch from working
5
+ // https://github.com/ember-fastboot/ember-cli-fastboot/blob/master/fastboot/initializers/ajax.js
6
+ // https://github.com/ember-cli/ember-fetch#ajax-service
7
+ } ,
8
+ } ;
You can’t perform that action at this time.
0 commit comments