Skip to content

Commit 05ec145

Browse files
committed
change seperator hash to ---
1 parent 7a74807 commit 05ec145

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

server/server.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import bodyParser from 'body-parser'
22
import express from 'express'
33
import path from 'path'
44
import deserialize from '../shared/deserialize'
5+
import symbolHashSplit from '../shared/symbolHashSplit'
56
import prefix from '../shared/prefix'
67
import context, { getCurrentContext, generateCurrentContext } from './context'
78
import emulatePrerender from './emulatePrerender'
@@ -123,7 +124,7 @@ server.start = function () {
123124
const payload = request.method === 'GET' ? request.query.payload : request.body
124125
const args = deserialize(payload)
125126
const { hash, methodName } = request.params
126-
const [invokerHash, boundHash] = hash.split('-')
127+
const [invokerHash, boundHash] = symbolHashSplit(hash)
127128
const key = `${invokerHash}.${methodName}`
128129
await load(boundHash || invokerHash)
129130
const invokerKlass = registry[invokerHash]
@@ -154,7 +155,7 @@ server.start = function () {
154155
const payload = request.method === 'GET' ? request.query.payload : request.body
155156
const args = deserialize(payload)
156157
const { version, hash, methodName } = request.params
157-
const [invokerHash, boundHash] = hash.split('-')
158+
const [invokerHash, boundHash] = symbolHashSplit(hash)
158159
let [filePath, klassName] = (invokerHash || boundHash).split("___")
159160
const file = path.resolve('..', filePath.replaceAll('__', '/'))
160161
console.info('\x1b[1;37m%s\x1b[0m', ` [${request.method}] ${request.path}`)

0 commit comments

Comments
 (0)