File tree Expand file tree Collapse file tree 2 files changed +5
-13
lines changed
Expand file tree Collapse file tree 2 files changed +5
-13
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " next-flow-interface" ,
3- "version" : " 0.17.6 " ,
3+ "version" : " 0.17.8 " ,
44 "description" : " Interface package for NEXT FlOW. You can use this package to build your own plugin that can control anything." ,
55 "type" : " module" ,
66 "module" : " dist/index.js" ,
Original file line number Diff line number Diff line change @@ -13,23 +13,15 @@ export function getPageTypeBySpaceText(space: string): PageType {
1313 return PageType . VIEWER
1414}
1515
16- export function forceGetSearchParams ( key : string , errorMessage = '' ) {
17- const params = new URLSearchParams ( window . location . search ) ,
18- mt = params . get ( key )
19- if ( ! mt ) {
20- if ( errorMessage ) {
21- console . error ( errorMessage , mt )
22- }
23- window . location . href = '/not-found'
24- return ''
25- }
26- return mt
16+ export function getSearchParams ( key : string ) {
17+ const params = new URLSearchParams ( window . location . search )
18+ return params . get ( key ) ?? undefined
2719}
2820
2921// Create a namespace object for backward compatibility
3022const PageUtils = {
3123 getPageTypeBySpaceText,
32- forceGetSearchParams ,
24+ getSearchParams ,
3325}
3426
3527export default PageUtils
You can’t perform that action at this time.
0 commit comments