File tree Expand file tree Collapse file tree
build/devices/pebble/host Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,6 +89,13 @@ globalThis.device = Object.freeze({
8989 }
9090} , true ) ;
9191
92+ const hook = function ( specifier ) {
93+ if ( AppInfo . isWatchface && blockedWatchFace . includes ( specifier ) )
94+ throw new Error ( specifier + " blocked in watchface" ) ;
95+
96+ return { namespace : specifier } ; // map through host modules
97+ } ;
98+
9299export default function ( ) {
93100 state . archive = ( new ArchiveResource ( ) ) ?. archive ;
94101 console . log ( `Found mod "${ state . archive . name } "` ) ;
@@ -156,18 +163,8 @@ export default function() {
156163 state . mod = new ArchiveCompartment ( state . archive , {
157164 globals,
158165 modules : { } ,
159- loadNowHook ( specifier ) {
160- if ( AppInfo . isWatchface && blockedWatchFace . includes ( specifier ) )
161- throw new Error ( specifier + " blocked in watchface" ) ;
162-
163- return { namespace : specifier } ; // map through host modules
164- } ,
165- loadHook ( specifier ) {
166- if ( AppInfo . isWatchface && blockedWatchFace . includes ( specifier ) )
167- throw new Error ( specifier + " blocked in watchface" ) ;
168-
169- return { namespace : specifier } ; // map through host modules
170- }
166+ loadNowHook : hook ,
167+ loadHook : hook
171168 } ) ;
172169
173170 Timer . set ( async ( ) => {
You can’t perform that action at this time.
0 commit comments